News for hackers. Stuff that matters.
Re:JSON as configuration files: please don’t (2016) by viklove on Saturday April 13, 2019 @10:11PM (#19657126)
I don't understand why people think JSON is a bad format for humans. The ability to write invalid JSON is very hard, and doing so will result in JSON parse errors. Take YAML on the other hand -- simply omitting a dash can result in unintended consequences that will parse just fine:

  some_collection:
    - first_entry
vs

  some_collection:
      first_entry
When you're staring at a non-trivial YAML file, it's very hard to spot these errors, and you'll potentially get some very weird behavior in whatever is depending on the config.
Re:JSON as configuration files: please don’t (2016) by bradleyjg on Saturday April 13, 2019 @10:22PM (#19657165)
Not as bad as YAML isn’t much of an endorsement.
Re:JSON as configuration files: please don’t (2016) by viklove on Saturday April 13, 2019 @10:32PM (#19657195)
Usually when people complain about JSON they offer YAML as a better option. This article complains about JSON and offers no alternative at all -- what would you suggest?
Re:JSON as configuration files: please don’t (2016) by bradleyjg on Sunday April 14, 2019 @08:04AM (#19658896)
I think for most cases, old school Unix style is perfectly adequate. Where it isn’t xml is the least bad alternative (and yaml is probably the worst).