3 ms·
JSON is a serialisation format. In cases where you're writing config, you'd surely be better pushing for something even more human-readable (I want to say YAML
by beaconstudios 8y ago
JSON is a serialisation format. In cases where you're writing config, you'd surely be better pushing for something even more human-readable (I want to say YAML but it has some problems, so something along those lines) because the cost of switching from JSON to <anything> is the barrier to entry, so you might as well go for the ideal if you are committing to switch.
I guess I just don't see where this fills a gap.
- philwelch 8y agoini is an underrated config format.
- beaconstudios 8y agoI am definitely a fan of INI, but (AFAIK?) it doesn't support structured data beyond simple sectioning.
- philwelch 8y agoConstraints are a good thing ;) You can fake it by having say, dot-delimited keys, but a lot of the complexity of config file formats come from the desire to support arbitrarily structured data when sometimes it's just as easy to fake it, not have it, or even use some templating.
- cmroanirgo 8y ago> it doesn't support structured data beyond simple sectioning Not exactly true (nor completely untrue). Look at your .gitconfig to see an example of how it can shoehorned in. Basically, it uses a .dot notation in a section header to distinguish levels. I wrote an little module a few years back that copes with structure support: https://www.npmjs.com/package/jsinf#the-format https://www.npmjs.com/package/jsinf#the-format
- geezerjay 8y ago> ini is an underrated config format. I agree, but the problem with ini is that it isn't a format in the sense that it hasn't been formally defined in a consensual way. Thus the monumental success of TOML as it fills the void that ini left unfilled for decades.