> Loading a user-provided (untrusted) YAML string needs careful consideration.
Why would you ever use YAML for user-provided input? At that point, it's better to just use JSON.
> Many other languages (including Ruby and PHP1) are also unsafe by default. Searching for yaml.load on GitHub gives a whopping 2.8 million results. yaml.safe_load only gives 26,000 results.
Maybe that's everyone's using JSON where it would be unsafe to use YAML.
> YAML files can be hard to edit, and this difficulty grows fast as the file gets larger.
And... this isn't the case for XML or JSON?
Ok, so reindenting a section might be a pain, but if your YAML is containing large amounts of data, maybe that data doesn't belong in that format if you're manually editing the YAML.
> especially since 2-space indentation is the norm and tab indentation is forbidden
Good. ;)
> And accidentally getting the indentation wrong often isn’t an error; it will often just deserialize to something you didn’t intend. Happy debugging!
Which is unlikely to happen if you're using a YAML library or only editing small-ish config files by hand.
---
As noted, YAML has a lot of quirks. As a configuration language, I love it and am used to the little edge cases. Could it be better? Definitely. But I would still consider YAML to be great in the domain where it excels: human-readable configuration. Using it to store and transmit large amounts of data, especially in ways where a human is manually editing the YAML, is a terrible idea.