4 ms·
What's the difference with JSON in that example? No double quotes around keys, that seems to be about it. It seems more practical/readable than JSON if you have
by tgv 3y ago
What's the difference with JSON in that example? No double quotes around keys, that seems to be about it. It seems more practical/readable than JSON if you have very limited need for nesting, but the old format would suffice then too.
- arp242 3y agoIn that specific example not too much, but obviously there's a whole bunch of differences between TOML and JSON, starting with the fact that you can add comments as has already been discussed, and many more.
- rightbyte 3y ago> you can add comments Given how many comment remover util functions I have written to make almost JSON config files proper JSON ... why could they not just have included those in the spec.
- arp242 3y agoBecause JSON is not designed for configuration files, but for data interchange, and this makes JSON "better" for that use case (the original motivation was "people were adding comment-based pragmas to JSON files, so I removed comments", but without comments it's also easier to parse, concatenate, etc.)