3 ms·
I couldn't disagree more about YAML. Semantic whitespace is unreadable, as are all the optional language elements. I've been using YAML for years and still can'
by smt88 3y ago
I couldn't disagree more about YAML. Semantic whitespace is unreadable, as are all the optional language elements. I've been using YAML for years and still can't read it quickly. I find myself asking, "Wait is that a string or boolean? Is it an object or siblings in an array?"
JSON is unambiguous and whitespace agnostic. There's only one way to do things. It's far more readable.
- vkaku 3y agoTry adding anything with quotes and multiple lines, and you'll quickly realize that YAML works better than JSON here. JSON as-is has fewer types and some things are better realized with the JSONNET way than stock.
- smt88 3y agoIf I need quotes and multiple lines in a JSON file, it's probably something that shouldn't be a config file. Either way, JSON5 has been around for years and is a logical update because it brings parity with ECMAScript. https://mit.cs.uchicago.edu/haohsiang/topics-auction/tree/025dfe8adc7d42aa685641678bc8f0d0df8c687d/node_modules/json5#:~:text=The%20JSON5%20Data%20Interchange%20Format,JSON5%20parsing%20and%20serialization%20libraries https://mit.cs.uchicago.edu/haohsiang/topics-auction/tree/02....
- lamontcg 3y agoUCL: https://github.com/vstakhov/libucl https://github.com/vstakhov/libucl
- smt88 3y agoYAML files can be written in JSON format because it is a superset of JSON, which sounds as insane as it is.
- hitchstory 3y agoIt's readable, it just desperately needs type safety: https://github.com/crdoconnor/strictyaml https://github.com/crdoconnor/strictyaml When I read "gbq enabled: yes" I don't worry about whether it's a string or a boolean when reading it, I worry about whether it's a string or a boolean when I want to change it and it gets parsed again.