Repeat after me: JSON is not a valid choice for human-editable configuration files.
Conversation
Notices
-
Embed this notice
zhenech (zhenech@chaos.social)'s status on Friday, 23-Dec-2022 23:15:20 JST zhenech - silverwizard likes this.
-
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Friday, 23-Dec-2022 23:18:14 JST silverwizard @zhenech @quincy @farseen The list syntax mandating ,s on all list items, except the last
That kind of violation of postel's law makes it a giant pain for humans -
Embed this notice
Farseen (farseen@social.linux.pizza)'s status on Friday, 23-Dec-2022 23:18:20 JST Farseen @quincy @zhenech Yeah lack of comments is a big one. But apart from that isn't it okay?
silverwizard likes this. -
Embed this notice
Quincy (quincy@chaos.social)'s status on Friday, 23-Dec-2022 23:18:22 JST Quincy @zhenech True. JSON files don't even support comments (!!)
silverwizard likes this. -
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Friday, 23-Dec-2022 23:21:24 JST silverwizard @zhenech @quincy @farseen I am a TOML evangelist who thinks YAML is read-only, writing is beyond finicky ime hypolite and silverwizard like this. -
Embed this notice
Farseen (farseen@social.linux.pizza)'s status on Friday, 23-Dec-2022 23:21:25 JST Farseen @silverwizard @zhenech @quincy riight the trailing comma.
What do you think of YAML btw?
silverwizard likes this. -
Embed this notice
Quincy (quincy@chaos.social)'s status on Friday, 23-Dec-2022 23:21:54 JST Quincy @farseen @silverwizard @zhenech I've used it, but it's kind of hard to get the syntax right
silverwizard likes this. -
Embed this notice
Quincy (quincy@chaos.social)'s status on Friday, 23-Dec-2022 23:22:41 JST Quincy @silverwizard @zhenech @farseen oh yeah, almost forgot about that
silverwizard likes this. -
Embed this notice
Quincy (quincy@chaos.social)'s status on Friday, 23-Dec-2022 23:23:04 JST Quincy @farseen for me it's the main sticking point. what about you, @zhenech ?
silverwizard likes this. -
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Saturday, 24-Dec-2022 04:30:23 JST silverwizard @zhenech @mennodeij People who like JSON are obsessed with the idea that XML is bad which is the most annoying thing
1) XML is not as bad as JSON
2) who cares about XML, it's not 2001 -
Embed this notice
Menno Deij - van Rijswijk 🏳️🌈 (mennodeij@mastodon.social)'s status on Saturday, 24-Dec-2022 04:30:29 JST Menno Deij - van Rijswijk 🏳️🌈 @zhenech neither is XML, yet here we are
-
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Saturday, 24-Dec-2022 05:16:30 JST silverwizard @me JSON is designed to not be readable at a glance and resist quick updates
XML is criticized for being too verbose -
Embed this notice
me (me@social.jlamothe.net)'s status on Saturday, 24-Dec-2022 05:16:31 JST me @silverwizard I'm genuinely curious, in what way is XML better than JSON? The only argument I can see for XML over JSON is support for namespaces, but I don't find that a terribly compelling argument.
To be clear, I don't think that either should be used for configuration files. -
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Saturday, 24-Dec-2022 05:22:04 JST silverwizard @me Nah, when it is a {,[, or (, and how do you add a thing to a list? What if it's in the middle? What if at the end?
To be clear - if you run JS a lot, JSON makes a lot more sense, but that's an unrelated crime -
Embed this notice
me (me@social.jlamothe.net)'s status on Saturday, 24-Dec-2022 05:22:05 JST me @silverwizard I think that with proper use of whitespace, JSON can be quite readable.
I will concede that machine-generated JSON is frequently a nightmare, but I find it no worse than machine-generated XML.