3 ms·
It 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]. JSO
by crdoconnor 8y ago
It 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.