3 ms·
Compared to yaml or ini formats, JSON is arguably harder to read and definitely harder to write due to having to keep track of brackets, commas, and/or quotes.
by u801e 5y ago
Compared to yaml or ini formats, JSON is arguably harder to read and definitely harder to write due to having to keep track of brackets, commas, and/or quotes.
Ideally, a configuration file should be easy to read and write/modify by a user of the application. A lot of applications just stick with ini like formats because it meets both requirements.
- secondcoming 5y agoMaybe it's because I've written C++ for years, but give me brackets over significant whitespace any day. If anything, YAML is harder to read because the indentation is important, yet deliberately invisible.
- Aloha 5y agoAgree. Whitespace with inconsistent rules is awful.
- benjarrell 5y agoFor me, the brackets, commas, and quotes are what make json readable (and writable). I really struggle to write yaml. I end up writing it as json and converting it. I agree about ini though.
- HelloNurse 5y agoJSON is unpleasant (for me, more unpleasant than XML), but at least it doesn't attempt to be clever like TOML and YAML.
- dragonwriter 5y ago> I really struggle to write yaml. I end up writing it as json and converting it. Since valid JSON is also valid YAML with the same semantics, it is impossible for it to be harder to write YAML than JSON, and no conversion is necessary.
- bwship 5y agoNot to mention being able to have comments in YAML. That helps make the file much clearer as well.
- mbrodersen 5y agoI prefer JSON to YAML. There are no objective way to measure whether one is better than the other.