26 #include <json/json.h>
33 string fileStr = FileHelpers::getFileString(
"data.txt");
37 bool parsingSuccessful = reader.parse( fileStr, root );
38 if ( !parsingSuccessful )
41 std::cout <<
"Failed to parse configuration\n"
42 << reader.getFormattedErrorMessages();
45 string myName = root.get(
"name",
"UTF-8").asString();
46 cout <<
"My name is "<<myName<<endl;
A series of functions to assist with file input/output.