JSON is an excellent tool for simple data interchange between servers,
but is a royal pain as a configuration file format which must also be
written and read by human beings. The difference between valid and
invalid JSON is often down to a single character in hard-to-spot places:
(It gets even worse if you want to generate valid JSON in the context
of, say, an ERB/moustache template file: ugly logic must be invoked to
make sure that lists are terminated correctly.)
Even worse: correct JSON does not allow for comments. And while you can
certainly do:
JSON is an excellent tool for simple data interchange between servers, but is a royal pain as a configuration file format which must also be written and read by human beings. The difference between valid and invalid JSON is often down to a single character in hard-to-spot places:
(It gets even worse if you want to generate valid JSON in the context of, say, an ERB/moustache template file: ugly logic must be invoked to make sure that lists are terminated correctly.)
Even worse: correct JSON does not allow for comments. And while you can certainly do:
...it's much harder to do something like this:
...whereas all of the above strings are valid and correct YAML.