I've never liked XML, and I have many of the same objections to JSON that you do. I'm not aware of any library that does exactly as you are asking for, though. Personally, I like to use Lua for my game files and data. It's quite handy for data description, even if I don't use it as an embedded script but just to load and move data.
Interesting. I've heard of Lua being used for data storage, and it certainly has a decent syntax for it. But how complex is it to read and write values? I always assumed you had to load up the file into a Lua VM, then perform stack calls into the VM to access your data. Which sounds overly complex when compared to other JSON/XML library APIs.
Pretty much this. Until recently I used Lua for this kind of thing extensively, but unless you like writing lots of tedious stack calling to get your data, you have to code an extra interface layer to allow Lua to build and populate your objects directly. Thanks to swiftcoder in this thread, I started using yaml-cpp and I have to say I'm a fan. Building a YAML node manually or reading data from a node are dead simple using the "new" interface, and structurally my data is very similar to a Lua table, as long as I only need data and not Lua functions-as-data.
Note that the yaml-cpp stable build is for the "old" interface which is apparently much clunkier; grab the latest build from the repository which supports syntax such as
so streaming data in an out is a breeze.