On Jun 14, 2006, at 8:35 AM, thn wrote:
>
> Hello - I'm new to JSON - and I'm trying to generate a JSON
> representation of some data, and fetching it with loadJSONDoc ... the
> issue I'm having is with linebreaks in the data - they result in a
> broken JSON representation..
>
> {"id" : "1", "title" : "Welcome", "content" : "*Hello* and
> *welcome* to
>
> CoB"}
Read the spec at http://json.org/ - line breaks in strings must be
escaped as \n.
You shouldn't be generating JSON by hand anyway, there's a library
already available for just about every language out there. Use one.
-bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---