3 ms·
I can't be the only person who thinks the monumental effort spent on config formats is bike-shedding. JSON is good enough for anything I've done. Not perfect,
by lr4444lr 3y ago
I can't be the only person who thinks the monumental effort spent on config formats is bike-shedding.
JSON is good enough for anything I've done. Not perfect, but no serious flaw that can't be fixed by just adding a simple app-specific post-process step that I will inevitably do for any other format anyway. JSONSchema gives us some typing sanity.
Can we just move on already to more interesting problems? It's not like git fulfills every VCS wish I've ever had either, but I have to move on. Projects and libs that introduce new config formats that continually remake the wheel, whose quirks have to be learned, are not helping my net productivity.
</rant>
- ihateolives 3y ago> JSON is good enough for anything I've done. I want comments in config files.
- skrebbel 3y agoJSONC is exactly that, JSON with comments. Works fine, eg typescript’s tsconfig file is JSONC and I’ve yet to find a problem with it.
- ok_computer 3y agoA horrible workaround I use is a blank redundant key and a leading // in my string to draw my eye to it. This only preserves the last comment in my python dictionary but I only use comments to work in the json file. { “”:”// comment here”, “Entry”:[-1,0,2], “”:”// next comment”, “Flag”:true }
- timmytokyo 3y agoAnd trailing commas on final list elements and object properties.
- bobbylarrybobby 3y agohttps://json5.org https://json5.org
- hddqsb 3y agoI can relate. But after using JSON for a while (in files that I edit by hand), I found that I really want comments and trailing commas (which leads to https://nigeltao.github.io/blog/2021/json-with-commas-comments.html https://nigeltao.github.io/blog/2021/json-with-commas-commen...). Next I'd probably want multiline strings (leading to https://github.com/json5/json5 https://github.com/json5/json5). But if you use those extensions, all your tooling breaks. (Aside: I think the real bike-shedding would start when you want to add some syntax for raw string literals, e.g. heredocs; it's one of those features that feels redundant, until the day when you really need it and you can't bear the pain of repeatedly escaping and unescaping.)
- eviks 3y agoYeah, don't know why some people don't want to settle on bad formats without such basics of human economics like comments and keep improving
- rewmie 3y ago> JSON is good enough for anything I've done. Not perfect, but no serious flaw that can't be fixed by just adding a simple app-specific post-process step that I will inevitably do for any other format anyway. If someone wants JSON with extra features like comments and typingz they are better off switching to Ion. https://amazon-ion.github.io/ion-docs/docs/spec.html https://amazon-ion.github.io/ion-docs/docs/spec.html
- mikece 3y agoGiven how little I deal with config files compared to the rest of my work I prefer formats that are obvious, even if verbose, to those with sneaky syntax. I'll take JSON or even XML over TOML any day.
- GuB-42 3y agoJSON is good enough for anything I've done. ... </rant> Except for closing comments, for that, you need XML.