Closed fedemp closed 13 years ago
Fedemp, if I'm understanding you correctly, that's a limitation of javascript, not of JSON - javascript doesn't support unescaped newlines in strings. Other languages (like python, etc) will parse that just fine - and the JSON spec at http://json.org allows it as well.
Currently the app would take this input as valid:
{ "foo":{ "bar":"whatever", "zet":"and ever" } }
but if you convert it to a string (just like jquery.getJSON does when it gets the JSON file through ajax), browsers (Opera 11 and Firefox 6) wil throw an error because the string contains invalid newline characterers aka the character \n