by FireInsight · 3y ago · 0 comments
I’m not saying that’s a good argument for using YAML, but IMO it should be a consideration for any data format that’s not binary.
The worst data formats are “not binary but still unreadable.” Apple Cocoa XML serialization format, I’m looking at you.
Markdown is a markup format that looks nice to humans, but neither XML nor HTML are particularly nice. Some XML-based formats like Microsoft Office documents are downright incomprehensible without specialized tools.
It obviously is, as you can see in [1] or [2].
[1]: https://en.wikipedia.org/wiki/YAML
[2]: https://en.wikipedia.org/wiki/Comparison_of_data-serializati...
What's hard to get? It's a data interchange format whose primary usecase is to store data structures intended to be read and edited by humans, using plain old text editors.
Edit:
> In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored (e.g. files in secondary storage devices, data buffers in primary storage devices) or transmitted (e.g. data streams over computer networks) and reconstructed later (possibly in a different computer environment). [Wikipedia]
So a serialization format is something a machine generates to store or transmit some internal data structure or state. JSON is an obvious example. YAML on the other hand is a superset of JSON with a lot of different ways to represent the same data. This creates a problem; the serializer has to choose which way to use. But writing YAML is simple, way more than JSON. Built in to YAML there are many things that seem to me to be made for the humans writing the format and not a program serializing to it. In fact, it's not often I see some machine-generated YAML, it's almost always something made for humans to write.