4 ms·
That's a false dichotomy. JSON could have comments and not be ambiguous like YAML. In fact: there exists a specification called JSON5 which does include comme
by wyldfire 3y ago
That's a false dichotomy. JSON could have comments and not be ambiguous like YAML.
In fact: there exists a specification called JSON5 which does include comments.
But I agree that it would've been nice if it had comments before it achieved a critical mass of adoption.
- squeaky-clean 3y agoI don't think they were saying that's an issue of comments, just an issue of yaml vs json.
- euroderf 3y agoI've read the opinion that comments were omitted from JSON in order to forestall hacky round-trip conversions to/from other formats (like XML). Can anyone confirm/deny ?
- mediumsmart 3y agoThe primary reason why JSON does not support comments is that its creator, Douglas Crockford, deliberately removed them from the format to prevent misuse and keep it as a pure data-only format. Crockford observed that some people were using comments to store parsing directives, which could break compatibility between different systems. Hence, the decision to remove comments to maintain the simplicity and consistency of the format across various programming languages and environments. https://www.freecodecamp.org/news/comments-in-json/ https://www.freecodecamp.org/news/comments-in-json/ I vote for the minimalist heretic. https://www.infoq.com/presentations/Heretical-Open-Source/ https://www.infoq.com/presentations/Heretical-Open-Source/