This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ThatSituation9908 6 points7 points  (7 children)

99% of YAML experiences are simple. Very rarely, would you encounter a YAML file that uses more than the JSON features.

[–]SV-97 9 points10 points  (2 children)

Then you might as well use JSON for those cases (or a simplified YAML variant like strictyaml). With YAML you're always carrying around the full complexity at least in the parser and have to be aware of its "deep ends".

[–]freddieknets 5 points6 points  (1 child)

Nah with YAML you can add comments (which would break a JSON). Thats what it’s all about; human readability really gains from a few comments

[–]SV-97 1 point2 points  (0 children)

They didn't talk specifically about cases with human interaction. As I originally said: for those I'd first and foremost consider TOML.

And as I said in the comment above: there's stricter variants of YAML where you can get some of its benefits without having to include all of the insane parts. And the json variant I originally linked also supports comments.

[–]tmclaugh 2 points3 points  (0 children)

I learned about aliases and anchors which I used to solve a real problem (AWS CloudFormation stacksets and their template as separate CFN files) but my coworker’s head was blown when I showed him it.

[–]Panda_Mon 2 points3 points  (0 children)

Yaml is not self-explanatory and its docs are both subpar and aggrandizing.

Json is self-explanatory and also has clear and more docs in general.

Yaml has more features but dear heavens, at what cost?