4 ms·
YAML's way, way more complicated that JSON. To pick one rough measure, the spec is about 7x as long. It includes a bunch of things that could be seen as negativ
by seagreen 6y ago
YAML's way, way more complicated that JSON. To pick one rough measure, the spec is about 7x as long. It includes a bunch of things that could be seen as negatives, such as nine(!) different ways to write multi-line strings (https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-over-multiple-lines/21699210#21699210 https://stackoverflow.com/questions/3790454/how-do-i-break-a...).
I don't have a single competitor to recommend, but JSON5, TOML, JSONC (mentioned in a sister comment), or something else along those lines might be better. I'd probably just go with whichever of those is popular in your community.
- mpfundstein 6y agoi really like hashicorp hcl. more than json. (and yaml is TERRIBLE)
- andybak 6y agoYAML might be terrible for the reasons given elsewhere but I really want something YAML-like (maybe TOML, maybe something else) For me, readability is king both for myself and because I sometimes want non-developers to be able to hand-edit files. Any curly brace format is a non-starter. Too much clutter, too easy to create invalid files that aren't obviously invalid at a glance. Significant white space does have the advantage of meaning exactly what it appears to mean and being intuitively understandable to most people.