News for hackers. Stuff that matters.
Re:JSON as configuration files: please don’t (2016) by dstroot on Saturday April 13, 2019 @12:36PM (#19654020)
My largest hang up is I LOVE to comment my configuration. So JSON is out by definition. YAML seems to work just fine for all my use cases and is less verbose and more human readable FTW.
Re:JSON as configuration files: please don’t (2016) by detaro on Saturday April 13, 2019 @12:48PM (#19654124)
IMHO, YAML tries to be too clever. E.g. the fact that it happily guesses types and doesn't require strings to be quoted creates tons of traps.

    languages:
        - en
        - de
        - no
    portmappings:
        - 8080:80
        - 2222:22
parsing the above, "no" is suddenly a boolean, and YAML 1.1 parsers will turn "2222:22" into the number 133342 (because there was a helpful rule that thinks the latter means "2222 minutes 22 seconds" and turns it into the number of seconds... https://docs.docker.com/compose/compose-file/compose-file-v2... )

I really liked it initially, but after using it a bunch I'd prefer a more restricted subset of it. (also hit a bunch of parser bugs/incompatibilities, where the complexity of supported cases probably also plays a role)

Re:JSON as configuration files: please don’t (2016) by the_imp on Saturday April 13, 2019 @02:25PM (#19654777)
To be clear, both of those issues are just with YAML 1.1. The core schema of YAML 1.2 dropped parsing "no" as true, or (as you mentioned) colon-separated numbers as sexagesimal integers. But yeah, unfortunately a number of libraries that only support 1.1 are still being used.