Hi,
I would like to use JSON for sending multiple variables like status, error-message and content to a Javascript function via Ajax.
The problem I'm having is that I fetch the content from a database and almost all data that is sent back to the browser is multi-line. And because of that it seems like my JSON is not validated.
An example of outout might be:
{
"status" : "ok",
"message" : "All is well",
"contents" : "Lorem Ipsum
Dolor sit amet"
}
Is there any special way of handling multi-line that I've missed or is it plain impossible (seems unlikely)?
Thanks!