News for hackers. Stuff that matters.
Re:Parsing JSON Is a Minefield (2016) by lifthrasiir on Monday October 11, 2021 @10:12AM (#28828500)
And all these problems trace back to Douglas Crockford. He didn't know how to make a proper serialization format [1] and also an interoperable standard (for the latter, Tim Bray tried very hard to make it slightly better [2]). He just noticed that a (supposed) subset of JavaScript can be easily turned into a serialization format with `eval` and went to publicize it, only noticing the issues later and still pursuring its standardization as is. I hate him.

[1] My additional complaints: https://news.ycombinator.com/item?id=24953981

[2] https://www.tbray.org/ongoing/When/201x/2014/03/05/RFC7159-J...

Re:Parsing JSON Is a Minefield (2016) by gmac on Monday October 11, 2021 @10:44AM (#28828890)
I was using JSON before it was 'invented', as was basically anyone sending data to the browser in JS format.

Holding specific people responsible is pretty absurd.

Re:Parsing JSON Is a Minefield (2016) by lifthrasiir on Monday October 11, 2021 @10:52AM (#28828968)
JSON before the standardization had an obvious data model and specification: ECMAScript. (I don't think JSON was widely used outside of JavaScript back then.) ECMAScript is particularly strictly defined even compared to other language standards, so it should have been possible to extract the relevant portions of ECMAScript into a proper standard. Crockford didn't. JSON as specified by Crockford was not even a proper subset of ECMAScript until ECMAScript itself retrofitted its syntax.