3 ms·
JSON lack of comments is their worst error. YAML near the user and JSON for the rest.
by azaras 2y ago
JSON lack of comments is their worst error.
YAML near the user and JSON for the rest.
- throw0101d 2y ago> JSON lack of comments is their worst error. Comments were an anti-feature: > 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. > Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser. * https://web.archive.org/web/20190112173904/https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr https://web.archive.org/web/20190112173904/https://plus.goog... Discussion at the time (2012): * https://news.ycombinator.com/item?id=3912149 https://news.ycombinator.com/item?id=3912149