[Catalyst] Catalyst::View::JSON parameters

Kevin Old kevin at kevinold.com
Mon Dec 3 20:04:18 GMT 2007


Hi Ian,

I've run into this using the XMLSimple module in
Catalyst::Action::REST and overwrote that module local to my
application.

I'd recommend overriding the C::V::JSON in your application (create a
Catalyst directory beside the 'lib' directory in your project, make a
View directory, then copy JSON.pm into that directory and customize it
to your needs.

You could then send that version to the modules author and see if
they'll incorporate the changes.  If they don't at least you have a
working version for your app and can continue developing.

Hope this helps,
Kevin

On Dec 3, 2007 2:48 PM, Ian Docherty <catalyst at iandocherty.com> wrote:
> I am trying to set the 'autoconv' flag for JSON so that numbers are
> quoted (it seems that Ext JS API requires it)
>
> I can't see any way to pass options to JSON through Catalyst::View::JSON
>
> On looking at the code for C::V::JSON it creates a new JSON::Any object
> but does not pass on any parameters (probably because there is no
> standard parameter mappings for the different JSON modules).
>
> I am at a loss as to how to do this without writing my own C::V::JSON
>
> Any suggestions?
>
> Regards
> Ian Docherty
>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
Kevin Old
kevin at kevinold.com



More information about the Catalyst mailing list