* Moritz Onken <[EMAIL PROTECTED]> [2007-11-19 15:30]:
> sorry, a bit off topic, but I'm looking for a
> perl-object-to-JSON converter which supports unquoted strings.

Derived though from Javascript as it may be, JSON is not
Javascript, and there is no such thing in JSON as an unquoted
(or single-quoted) string.

> Modules like JSON::Any quote everything except true and false.

Now you know why.

> But I need to pass unquoted strings to let JavaScript run some
> functions.
> 
> Any suggestions?

Dump your data structure to JSON incrementally and interpolate
the JSON snippets into a template that generates Javascript which
does whatever you need to build the final data structure. (You’re
generating Javascript and not JSON anyway.)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to