by pjbk · 6y ago · 0 comments
I remember being pretty excited when I discovered YAML and even pushed its use in some projects trying to avoid the verbosity of XML. These days I will never trade accuracy for conciseness, in particular if its form relies on whitespace and there is not enough redundancy in the specs for consistency checks. Yes, syntax matters.
It's not a panacea, but it can help avoid those long debugging sessions.
[0]: https://json-schema-everywhere.github.io/yaml
[1]: https://marketplace.visualstudio.com/items?itemName=redhat.v...
So git merge will say "no merge conflicts", but actually there were whitespace changes.
You can still omit quotes around strings, use comments and add trailing commas after the last element of collections.
A configuration file written in that style is actually pretty nice. I’ve never understood why people don’t use this.
[0] - https://json5.org/