Interchange formats are many, JSON, BSON, XML, YAML and it goes on. A lot of these formats are very much at home in certain languages and/or task. YAML is very comfortable in Ruby, but to get it into C++ requires a fairly hefty library for what it is. XML parsers are easier to get into C++ but XML lacks the readability of YAML.
I don’t need yaml for what I need in C++, I really just need (want?) a better .INI file for config type things.
NYAML (Not YAML!)
Taking the main syntax style of YAML, but dropping a lot of the specs, we can strip yaml right back to a key value tree.
This is nice and readable, no special syntax highlighting required, and we can boil this straight down to a C++ lookup.
I’ve wrapped this up as a single header library that can be found on github here. This isn’t meant to be a fully fledge interchange format, its just meant to have a yaml like key/value config file.