4 ms·
> I just wonder why JSON doesn't get all the hate, while it is a terrible format also: […] it doesn't have comments […] The lack of comments in JSON is not a b
by throw0101a 1mo ago
> I just wonder why JSON doesn't get all the hate, while it is a terrible format also: […] it doesn't have comments […]
The lack of comments in JSON is not a bug; comments in JSON were an anti-feature. Douglas Crockford intentionally removed them to prevent developers from using comments to store parsing directives (which he saw people doing in earlier revisions).
* https://web.archive.org/web/20120507093915/https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr https://web.archive.org/web/20120507093915/https://plus.goog...
* 2012: https://news.ycombinator.com/item?id=3912149 https://news.ycombinator.com/item?id=3912149
- fluffybucktsnek 1mo agoI'd say that only really strengthens OP's overall point of being about using "the wrong language for the wrong thing".
- throw0101a 1mo agoYes: JSON was meant to be a machine-to-machine format, and it's the humans that are insisting on comments.
- krapp 1mo agoJSON was also meant to be read and edited by people, as was all web technology, and people have a use for comments. Even Douglas Crockford suggested that people could still use comments, as long as they strip them out before parsing.