23 ms·
I wish JSON5 was more popular
- mccorrinall 4y agoJSON5 makers apparently didn’t even know about prototype pollution until this week.
- verdverm 4y agoUse CUE and then generate your JSON/Yaml/etc
- MathMonkeyMan 4y ago> I couldn’t tell you why uses has a dash in front, and node-version does not. Yes you could. I agree that YAML is hard to parse, but a moment's reflection reveals that "steps" is an array of things, and "node-version" is a property of "with", which is a property of the second element of "steps" (along with "uses"). The thing that has tripped me up about YAML the most is the question of when I have to indent, and by how much. Generating configuration for a system is a pain in the ass and carries all the ills of a build system, but a loud comment saying "this is generated from X!" and a Makefile do well enough most of the time. Some ideas for configuration formats: - .js file that evaluates to a JSON-compatible value - [EDN][1] and other s-expressions - a file system tree There are two extremes. On the "no code" side there are gigantic reams of JSON/XML/YAML whose overall structure is all but impossible to understand. On the "all code" side there is a bespoke program that concisely produces the configuration but that can't be understood without already knowing the output. I aim for the middle. [1]: https://github.com/edn-format/edn https://github.com/edn-format/edn