upvote
If not using any esoteric features, it's more human readable (imo), easier to write, can have comments and has some useful features like different kind of multi-line values. JSON is valid YAML, by the way.
reply
Because YAML is the worst config format, except for all the others.

https://opensource.posit.co/blog/2026-05-21_in-defense-of-ya...

reply
> less human-readable version of JSON

Please provide an example, how YAML can be less readable than JSON. I struggle to think of any.

reply
Indentation based structure isn't really a good thing in my eyes, where the format of the document encodes semantic meaning. With JSON, you can display it how you want, and because it's bracketed it will still encode the same data.

Also I really don't like the hyphen notation... This is very unreadable to me:

  - a
  - b: c
  - - d
reply
YAML:

  - - "hello"
YAML expanded:

  -
    - "hello"
JSON (typical formatting):

  [
    [
      "hello"
    ]
  ]
And EDN for good measure:

  [["hello"]]
I know which one I prefer :) Silly example perhaps, but once you have X lists nested in Y lists, it does become a lot easier to see why some prefer a bit more visually hierarchically stronger syntaxes
reply
I still prefer ini files for configuration. Easier to grep and sed.
reply
You can get a bit more if you use TOML over INI... it's similar at a baseline, but still a bit more rich for advanced configuration than INI is.
reply
They work wonderfully until you need to do anything more advanced than a key-value store.
reply
My belief is that anything that requires more than that are hiding the fact that what they truly need is a DSL. Instead they force you to write AST (ansible, github actions, docker compose,…)
reply
People use YAML because a bunch of other people use YAML. Whatever its warts, there's no use resisting it.
reply
There’s lots of overengineered features in YAML that are problematic, but at a high level, it’s much, much more human-friendly than JSON. And if you love JSON, good news: it’s 100% valid YAML.
reply
> it just seems like a more overcomplicated

Because people LOVE overcomplicated shit. You see it happen everywhere.

reply
I don't think that's it
reply
Because as long as you stay away from anchors and inline JSON, YAML is a perfectly workable, structured, human-readable format that supports comments.
reply