News for hackers. Stuff that matters.
Re:JSON: The JavaScript subset that isn't by kennu on Sunday January 06, 2013 @08:42AM (#5016283)
I think the article's point was that Unicode characters U+2028 and U+2029 are illegal in JavaScript string literals.

Yet, the JSON specification (RFC 4627) officially allows them to exist in JSON string literals:

"All Unicode characters may be placed within the quotation marks except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F)."

So with U+2028 or U+2029 you can construct a valid JSON object that JavaScript can't parse.

There are no comments on this comment yet.