Hacker News new | past | comments | ask | show | jobs | submit login

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.




For 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.


> 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.


JSON is unpleasant (for me, more unpleasant than XML), but at least it doesn't attempt to be clever like TOML and YAML.


Not to mention being able to have comments in YAML. That helps make the file much clearer as well.


I prefer JSON to YAML. There are no objective way to measure whether one is better than the other.


Maybe 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.


Agree.

Whitespace with inconsistent rules is awful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: