2 ms·
> For a format designed to be human readable, JSON not supporting comments is a major let down. Comments were an explicit anti-feature. Douglas Crockford in 20
by throw0101c 4y ago
> For a format designed to be human readable, JSON not supporting comments is a major let down.
Comments were an explicit anti-feature. Douglas Crockford in 2012:
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability.
* https://web.archive.org/web/20120507104813/https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr https://web.archive.org/web/20120507104813/https://plus.goog...
* https://news.ycombinator.com/item?id=3912149 https://news.ycombinator.com/item?id=3912149 (discussion at the time)
And JSON primary purpose was to be a data interchange format; the fact that is human-readable text is a nice bonus.
- afiori 4y agoA choice can be a good choice and still lead to worse results. As things are now trailing commas and comments would make JSON a better format, whether they were a good compromise at the time is not really the point.