[Catalyst] need JSON converter which supports unquoted strings

Moritz Onken onken at houseofdesign.de
Mon Nov 19 14:44:51 GMT 2007


yes that works, but I'm using a framework which does not do this. So I
really need to pass unquoted strings.


Am Montag, den 19.11.2007, 14:37 +0000 schrieb Adeola Awoyemi:
> Moritz Onken wrote:
> > Hi,
> >
> > sorry, a bit off topic, but I'm looking for a perl-object-to-JSON
> > converter which supports unquoted strings.
> > Modules like JSON::Any quote everything except true and false. But I
> > need to pass unquoted strings to let JavaScript run some functions.
> >
> > Any suggestions?
> >   
> If the quoted string is a function can't you just eval it and stuff it 
> in a var:
> 
>     var myFunc = eval( JSON.someFunction );
>     var result = myFunc( 'args' );
> 
> I haven't tried this but this _should_ work.
> 
> Adeola.
> 
> 
> _______________________________________________
> 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/




More information about the Catalyst mailing list