2 ms·
Comments were an anti-feature of JSON: purposefully removed. JSON was (originally) meant as a machine-to-machine interchange format, and why would machines need
by throw0101a 7y ago
Comments were an anti-feature of JSON: purposefully removed. JSON was (originally) meant as a machine-to-machine interchange format, and why would machines need comments? From the creator of JSON, Douglas Crockford:
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.
* https://web.archive.org/web/20120507093915/https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr https://web.archive.org/web/20120507093915/https://plus.goog...
Basically: he didn't want people to start putting in pragmas in comments.
2012 discussion:
* https://news.ycombinator.com/item?id=3912149 https://news.ycombinator.com/item?id=3912149