Re:Zellij – A Terminal Workspace and Multiplexer
by j1elo on Thursday April 22, 2021 @12:21PM
(#26904563)
I never got this stance; JSON sucks for config files, because as a user, if there is anywhere that I need and am more thankful for comments, is in a configuration file. And TOML is maybe a good substitute for INI formats, but it doesn't really support nested data like JSON would, so suggesting to use TOML instead of JSON is misleading except for the simplest and most basic needs.
If replacing JSON is the objective, I'd very much rather recommend HJSON [1] than TOML.
Re:Zellij – A Terminal Workspace and Multiplexer
by mikey_p on Thursday April 22, 2021 @12:34PM
(#26904722)
What about HOCON? https://github.com/lightbend/config/blob/master/HOCON.md
Re:Zellij – A Terminal Workspace and Multiplexer
by j1elo on Thursday April 22, 2021 @03:29PM
(#26907081)
I guess why not? I mean, there are lots of options here. I prefer HJSON, also it helps a lot that its website does a very good job at convincing other fellow devs to try it...
But there is also JSON5, among the most popular alternatives. Then HOCON you mention, and probably a myriad more.
Re:Zellij – A Terminal Workspace and Multiplexer
by earthboundkid on Friday April 23, 2021 @09:24AM
(#26914500)
> it doesn't really support nested data like JSON would
This is just plain wrong. It supports exactly the same kind of nesting as JSON.
Re:Zellij – A Terminal Workspace and Multiplexer
by dreamer7 on Thursday April 22, 2021 @01:36PM
(#26905489)
Could your problem be partially resolved by having a key called description or comments where you could provide some clarification?
Re:Zellij – A Terminal Workspace and Multiplexer
by outworlder on Thursday April 22, 2021 @03:11PM
(#26906866)
But now that's part of the data and the parser doesn't know any better. Comments are more useful if they are close to the thing being talked about.
Re:Zellij – A Terminal Workspace and Multiplexer
by forgotpwd16 on Thursday April 22, 2021 @12:08PM
(#26904390)
The human readable part is a bit subjective. I find YAML more human readable than TOML.
Re:Zellij – A Terminal Workspace and Multiplexer
by earthboundkid on Friday April 23, 2021 @09:26AM
(#26914507)
Readable, maybe? I mean as long as the YAML is correctly quoted, sure, it looks fine. But that's a big if. But writeable, hell no. I have been writing YAML for years and still have no idea how the quoting works, and not for lacking of looking it up in the past.
> YAML though is always a bad fit. If you want machine readable config, use JSON; human readable, use TOML. When does YAML ever fit?
https://twitter.com/carlmjohnson/status/1372224080749993988