There is a tree of defaults from the repo and a tree of config which overlays it with any changes.
TOML is less than ideal with (as was pointed out) nested tables – the problem I ran into is that some valid TOML cannot be serialized with serde.
You are limited to very few types, important ones like dates are missing, JSON is a pain to write and format without a "smart" editor. It’s also a pain to read as soon as you start listing complex things.
Not saying here that YAML or TOML are better (though I personally prefer TOML) but more that nothing is really nice.
It’s just that if we have to give up on a config format to be easily editable with basic tools, maybe we should have stuck with XLM. At least it had solid format definition and enforcement. It’s a semi-troll but maybe we could have something in between XLM and YAML.
ie. YAML. Write your JSON with comments and parse it with a YAML parser. Most decent libraries spit out readable YAML or even JSON if you tweak it to always quote strings.
if only people could get past the terror and see the light...
Of course if you can stay away from somewhat complex hierarchies then great! I can't imagine TOML ever working for something like a CI system or terraform config though.