4 ms·
YAML is a superset of JSON, so you can use JSON-style braces if you prefer. Just FYI.
by jdenning 8y ago
YAML is a superset of JSON, so you can use JSON-style braces
if you prefer. Just FYI.
- krapp 8y agoJSON with significant whitespace is just everything bad about JSON and a little bit worse, though.
- tenryuu 8y agoBut 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.
- evil-olive 8y agoIMO, the only thing more confusing than a complex YAML file is a half-YAML, half-JSON hybrid.
- geezerjay 8y ago> YAML is a superset of JSON Actually it isn't. That was left as an afterthought and IMHO as a trick to try to ride the coat tails of JSON. YAML in the wild is a god-awful mess that bears no resemblance to JSON. To me YAML's only purpose is to enable lazy people like me to take notes in a text editor with code folding and syntax highlighting.
- likeclockwork 8y agoThat sounds like a light version of org-mode.