3 ms·
I'm happy to complain about JSON as a config format as well.. Yaml is so hard to get right, a misplaced dash or indentation in a list and you're screwed but it
by matsemann 3y ago
I'm happy to complain about JSON as a config format as well..
Yaml is so hard to get right, a misplaced dash or indentation in a list and you're screwed but it's still passable, just does something else than expected. It's not really human readable either, it takes a lot of brainpower (at least for me) to understand what belongs together in a list or how things are grouped together. Much more than for instance xml where it's obvious.
Yaml only barely works, because many editors have added support to help you write k8s config. Otherwise it would be impossible.
- JohnMakin 3y agoIt’s essentially the same data structure under the hood. It’s the interpreters/parsers that are the issue at least in this complaint. “Norway” being interpreted as “NO” boolean false is something that sounds very weird to me, almost to the point of being hyperbole, and I’ve worked with “yaml” (mostly helm and simple configs) for years and dealt with really ridiculous parsing issues. Usually though they’re really easily resolved. Yea, you shouldnt put a lot of logic in your configs. yaml doesnt do that. the tooling does. and templates can be simple and easy to read and DRY principles can put you into traps that make your code harder to maintain than it should be.
- kristiandupont 3y ago>It’s essentially the same data structure under the hood Sure, and in the end it's all 1's and 0', but that doesn't seem relevant.. >“Norway” being interpreted as “NO” boolean false is something that sounds very weird to me Agreed, it's truly weird. YAML tries to be helpful and guess what you meant, a trait that is great in many situations, but not in a config language.