json-spirit

JSON_Spirit: good examples of unpacking a JSON string?

Any good examples/tutorials of unpacking JSON strings with the C++ JSON_Spirit library? Something that can traverse a json_spirit::Value object and pretty-print it would be ideal. ...

JSON_Spirit: mapping value.type() back to the type?

You can display a Value's type like this: cout << val.type() << end; and it print a number. How can I map this number back to the actual type? besides peeking in the header file, of course, which reveals all... enum Value_type { obj_type,array_type,str_type,bool_type,int_type,real_type,null_type }; ...