News for hackers. Stuff that matters.
Re:Simdjson – Parsing Gigabytes of JSON per Second by eesmith on Thursday February 21, 2019 @12:04AM (#19214691)
https://en.wikipedia.org/wiki/JSON#Data_portability_issues :

> Although Douglas Crockford originally asserted that JSON is a strict subset of JavaScript, his specification actually allows valid JSON documents that are invalid JavaScript. Specifically, JSON allows the Unicode line terminators U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR to appear unescaped in quoted strings, while ECMAScript 2018 and older does not.

Re:Simdjson – Parsing Gigabytes of JSON per Second by empyrical on Thursday February 21, 2019 @01:32AM (#19214979)
That bit of incompatibility will be going away when this proposal is implemented, however:

https://github.com/tc39/proposal-json-superset

Re:Simdjson – Parsing Gigabytes of JSON per Second by v413 on Thursday February 21, 2019 @03:16AM (#19215335)
It is already implemented in the current Firefox, Chrome and Safari 12.
Re:Simdjson – Parsing Gigabytes of JSON per Second by chubot on Thursday February 21, 2019 @12:15AM (#19214735)
Yeah I remember that quirk, and that's why I said it's "as much of a subset as it ever was". :) Because of this issue, it was technically never a subset.

But almost all real JSON documents are subsets of JavaScript, unless they happen to have those characters.

And the salient point is that if JSON never changes, then no further divergence from JavaScript is possible.

Re:Simdjson – Parsing Gigabytes of JSON per Second by eesmith on Thursday February 21, 2019 @12:38AM (#19214806)
But remember that your comment wasn't actually addressing avmich's objection to the assertion "All JSON is JavaScript, but not all JavaScript is JSON".

That assertion is indeed incorrect.

avmich then wrote "I thought they diverged specifications".

That is also correct. JSON was meant to be a perfect subset of JavaScript. Instead, and by accident, it diverged from the relevant specification.

Your comment instead was mostly focused on opposition to changing the existing JSON specification, which is a different topic.

Re:Simdjson – Parsing Gigabytes of JSON per Second by daveevad on Thursday February 21, 2019 @01:46AM (#19215043)
> JSON allows the Unicode line terminators U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR to appear unescaped in quoted strings, while ECMAScript 2018 and older does not.

My code has parsed a lot JSON and that is new data to me. Thank you for that!

Do you know the historical reasoning for this particular deviation? Are there any infamous bugs or common use cases this departure impacts?