Parsing JSON with boost property tree
I'm building an application that gets movie information from themoviedb.com. The information is provided in a JSON file. I'm trying to store the information using boost property tree. But There is a little problem. I illustrate the problem by the following code: #include <vector> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <boost/foreach.hpp> using namespace std; using boost::property_tree::ptree; class single_t{ int sID; string sName; public: void setID(int ID){sID=ID;} int getID(){return sID;} void setName(string Name){sName=Name;} string