3 ms·
YAML is really so much more than JSON. * YAML can have several 'documents' in the same file,separated by --- * there are anchors and references * easy to
by cuillevel3 7y ago
YAML is really so much more than JSON.
* YAML can have several 'documents' in the same file,separated by ---
* there are anchors and references
* easy to read multi line texts
* it's also a superset of JSON
I can see, how choosing YAML when you just wanted readable JSON might give you more headaches than expected.
And like someone else said, putting another template engine (or two) on top of YAML is when the real problems start.
- c3534l 7y agoIt's really to maintain JSON without being allowed comments. JSON is fine for transmitting data across the web, but if you need complex configuration data in version control that many people work on, you need comments so new teammates can be easily onboarded onto a project. There's definitely a need for something that is programming-language-like, but entirely about structuring and formatting data for configuration. YAML is the closest thing to that. It's not perfect, but it works better for that purpose than JSON or XML.