3 ms·
But YAML supports comments multiline. You can't just say everything bad about JSON while neglecting the article's intentions in the flaws of JSON
by tenryuu 8y ago
But YAML supports comments multiline. You can't just say everything bad about JSON while neglecting the article's intentions in the flaws of JSON
- geezerjay 8y agoThe lack of comments is not a flaw but one of JSON's many virtues which takes into account the many lessons in life on how comments are used ans abusef to extend a basic format with ad-hoc directives. Evenso, anyone who wishes to support comments in JSON is free to do so by employing a filter.
- krapp 8y agoIf we removed every useful feature of a language because it could potentially be abused, we wouldn't have any features in any languages. Removing comments from JSON because some people might use them for parsing directives was an overreaction. The alternative always presented is to pollute your objects with "comment" values which, unlike actual comments, take up space and need to be parsed or filtered. Just imagine how silly it would be in any other language for comments to be replaced with variables. And... nothing is stopping people from adding parsing directives in JSON itself anyway.