generate and parse json in C++ using reader / writer style APIs