
On Tue, Dec 1, 2009 at 1:24 PM, Richard Ulrich
I'm using json_spirit from http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx for parsing big but simple json files. So far I didn't have any problems with it.
One objection I have with json_spirit is that its value is rather heavy memory wise, and also forces initializing all of the members. Maybe that's no longer true, I got the code below in Mar09. I think something boost::variant-based would be more suitable (incorrectly mentioned using tuple in my first post, when I meant variant). --DD namespace json_spirit { enum Value_type { ... }; typedef std::vector< Pair > Object; typedef std::vector< Value > Array; class Value { ... private: Value_type type_; std::string str_; Object obj_; Array array_; bool bool_; int i_; double d_; }; }