Comment #4 on issue 1907 by l...@chromium.org: The literal chars 0x2028 and 0x2029 should be avoided in JSON
http://code.google.com/p/v8/issues/detail?id=1907

In fact, the ES5 specification doesn't leave a lot of wriggle room wrt. implementing JSON. The Quote function (http://es5.github.com/#Quote) specifies uniquely how to stringify JS string. If we started replacing U+2028 with "\u2028", we would be violating the specification. It would still generate valid JSON (because JSON doesn't require U+2028 to be unescaped), but it won't be a valid ES5 implementation of JSON.stringify.

You're not the first to think this is a problem: http://timelessrepo.com/json-isnt-a-
javascript-subset :)

--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to