3 ms·
But yaml + comments (+ commented out optional settings) is basically the best semi self documenting config format in existence. Jason doesn't allow comments, X
by AtlasBarfed 4y ago
But yaml + comments (+ commented out optional settings) is basically the best semi self documenting config format in existence.
Jason doesn't allow comments, Xml is too verbose and lacks a zero-depth later (aka a properties file), properties files can't do arrays or hierarchies or complex inline stuff, and aren't well standardized, and TOML is ugly.
I'm not some yaml zealot, it's not a perfect format, but ... I've seen nothing better.
- AndyKluger 4y agoIn case you're interested and haven't seen it, I've become a big fan of NestedText, which is similar to YAML but without the complicated parts, and without types (just strings, lists, and dicts). The idea is that any meaningful validation and coercion belongs in code anyway. An extra cool part is that nothing ever needs to be escaped, so the content is super clean and unambiguous. If you want to play around with it, I made NestedTextTo (nt2 on PyPI), for CLI conversion between NestedText and YAML, TOML, or JSON, with a pretty cool (IMO) way to cast value types along the way. https://nestedtext.org/en/stable/ https://nestedtext.org/en/stable/ (not my project) https://github.com/AndydeCleyre/nestedtextto https://github.com/AndydeCleyre/nestedtextto (my project)