4 ms·
I 100% disagree. I rave about JSON. I don't understand the rants with config files, but I could bet $20 that they _always_ begin with "but my comments!". In
by Zamicol 8y ago
I 100% disagree.
I rave about JSON. I don't understand the rants with config files, but I could bet $20 that they _always_ begin with "but my comments!".
In the past I've promptly replied with (copied from my Reddit post):
Douglas Crockford said to use comments in json config files:
"Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser."
Which was at the following link before Google killed Google+
https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaGSr https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
Here's my flag solution with JSON config files: https://github.com/zamicol/jsonflag https://github.com/zamicol/jsonflag I've never read this "arp242.net" article, but my solution anticipates some of its complaints, such as environmental variables, and addresses them. What I mean to get at is that this isn't rocket science and the "deficiencies" of JSON are flexibilities left to be easily addressed by the programmer. JSON is a great level of complex without being too much.
Every time this comes up, I don't understand how https://json5.org https://json5.org isn't superior to YAML in every way.
If there was some deficiency with JSON5, just simply use JSON with comments. It's that simple.
JSON is one of the best things to ever come out of the CS disciplines. Moreover, JSON is a javascript subset. If json isn't sufficient, why not first try a different javascript subset/json superset before trying something more alien?