Sep-28-2017, 07:22 PM
I'll take the opposite position: I hate json. It's better than xml, but that's not a very high bar. They're both read-only languages.
In my opinion, if a config file is meant to be edited by humans, it should be fairly loose in what it allows, and be pretty obvious on how to structure it. To that end, I like yaml and toml. Even .ini files aren't bad.
json just has too many weird quirks which makes it unsuitable for editing by hand, like how it's illegal for the last element in a list to end in a comma.
In my opinion, if a config file is meant to be edited by humans, it should be fairly loose in what it allows, and be pretty obvious on how to structure it. To that end, I like yaml and toml. Even .ini files aren't bad.
json just has too many weird quirks which makes it unsuitable for editing by hand, like how it's illegal for the last element in a list to end in a comma.
# invalid json: [ "item1", "item2", "item3", ]