5 ms·
TOML is syntactically noisy and about 50% more verbose.
by crdoconnor 8y ago
TOML is syntactically noisy and about 50% more verbose.
- cyphar 8y agoI'm not sure how [general] foo = bar is 50% more verbose than { "general": { "foo": "bar" } } But also it's significantly more human-readable (and critically, it's much more human-writable).
- crdoconnor 8y agoIt starts to get more verbose when you have more keys and deeper indentation since the whole hierarchy is repeated for each key e.g. [general.foo.bar.bar]. JSON wasn't intended for maximal human readability/writability like CSON/YAML were. It was intended first and foremost as a simple data transmission format.
- richardwhiuk 8y agoLarge hierarchies are always difficult in plain text formats. I'd argue if you need the user programming the config to understand a large hierarchy then you've already got a problem.
- crdoconnor 8y agoBy large I mean two/three levels and above. Nothing's perfect but YAML does that fairly well (e.g. ansible playbooks) TOML handles anything three levels or above in a less readable way than indented JSON (which doesn't even prioritize readability). It looks find provided you're only dealing with tiny ultra simple config files.
- richardwhiuk 8y ago[foo.blah.bee] hi = 4 seems readable enough.