5 ms·
TOML?
by theli0nheart 7y ago
TOML?
- pitaj 7y agoCan't recommend TOML enough. I use it for everything. Super simple and easy to edit. It fulfills all of the requirements. There are several available C++ TOML parsers, including one from Boost.
- nine_k 7y agoTOML is great when your data are mostly flat.
- meowface 7y agoIt's great at representing nested data in a flat way, as well.
- ziotom78 7y agoTOML would be great, if not for an annoying obscure detail in the specification that makes it hard to use for my typical use cases (scientific computation) [1]. Moreover, I find quite unintuitive how you are supposed to specify array of tables [2]: this kind of is much easier in JSON (which is the format I am currently using, although it is far from perfect). [1] https://github.com/toml-lang/toml/issues/356 https://github.com/toml-lang/toml/issues/356 [2] https://github.com/toml-lang/toml#user-content-array-of-tables https://github.com/toml-lang/toml#user-content-array-of-tabl...
- pitaj 7y agoThat is an annoyingly obscure detail, I think the wrong decision was made there. Hopefully it gets reversed. Personally I really like the array of tables syntax. It is a little unintuitive but it's not difficult to remember. It's useful for fulfilling the OP's "No document closing necessary, so appending is trivial" requirement. And if you don't want to use it, you can always use inline tables in an array, just like JSON.