3 ms·
The author is right, both JSON and XML are better for configuration files. Non ambiguous structure, parsable, nested values, lists, maps, and so on. If JSON h
by coldtea 3y ago
The author is right, both JSON and XML are better for configuration files.
Non ambiguous structure, parsable, nested values, lists, maps, and so on.
If JSON had comments it would be ideal - and for configuration you can support it.
Just check VS Code for what is possible to do directly regarding configuration with JSON, and also to build on top.
- enoch_r 3y agoYAML is a superset of JSON, so if you prefer JSON, you can - any valid JSON is also valid YAML.
- politelemon 3y agoDepending on the yaml parser's quirks.
- coldtea 3y agoIt is, but then you just use JSON, and can ignore YAMLs design issues and broken design, plus benefit from the mass more readily available and faster parsers!
- makapuf 3y agojson5 for complex config files is quite nice.