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"}

I get SyntaxError: 'unterminated string literal'

So now I'm trying to add the javascript line continuation slashes \ at
each newline. Is that the best solution?

I know this isn't a mochikit issue, but I thought some of you may have
encountered this when using loadJSONDoc. I searched for json and
newlines but wasn't able to find anything else on it. My add-slashes
solution seems a little clunky. Any suggestions?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to