I\'d like to create a JSON string containing the instance variables of my class.
For example,
class Example { std::string string; std::ma
Have you looked at cereal (http://uscilab.github.io/cereal/) ? It has JSON archives for serializing to/from JSON using C++.
An example with minimal overhead (from cereal) can be found here on SO: https://stackoverflow.com/a/22587527/255635