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

Well, then the spec should be fixed. According to www.json.org, JSON “is based on a subset of the JavaScript Programming Language” which shows the intention that any JSON expression is also a valid JavaScript expression. Currently this doesn't happen because of this small detail, which probably escaped Crockford's attention when he wrote the JSON spec.

Better yet, IMO, EcmaScript should evolve to allow newlines in strings, but I know this might take longer than Duke Nukem Forever. In the mean time, I think implementations could and should provide workarounds for obvious issues, providing that they don't alter fundamental behavior (which is the case here).

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

Reply via email to