VioletPixel

🗣️ The yaml document from hell

Ruud van Asseldonk in the introduction to a great post about the pitfalls of YAML:

For a data format, yaml is extremely complicated. It aims to be a human-friendly format, but in striving for that it introduces so much complexity, that I would argue it achieves the opposite result. Yaml is full of footguns and its friendliness is deceptive. In this post I want to demonstrate this through an example.

I've never liked YAML, and this post does a great job of articulating why it's a hot mess.

The thing that really threw me for a loop while reading this, though, came early while Rudd is comparing YAML to JSON:

The json spec is not versioned. There were two changes to it in 2005 (the removal of comments, and the addition of scientific notation for numbers), but it has been frozen since — almost two decades now.

The removal of comments? JSON had comments?!

I have yearned for comments in JSON for as long as I can remember, and now you're telling me they were there two decades ago and got removed?

Wild.

Anyway, the rest of Rudd's post is great. Try not to dwell on the fact that JSON used to have comments and give it a read!