// Parse JSON and show errors if needed
Json::CharReaderBuilder rbuilder;Json::Reader reader;
Json::Value root;
// Configure the Builder, then ...
std::string errs;
std::istringstream config_doc(jsonString);
bool parsingSuccessful = Json::parseFromStream(rbuilder, config_doc, &root, &errs);
here we get Json::value root which gives us ordered list of the parameters how can we get the original state of params? jsonString example= { "_id" : 0, "title" : "", "author" : "", "available" : 0, "checkout" : "" }
with above example when we iterate the root i get : _id, author,available,checkout,title which is ordered by parameter name but i want it in the order the json object is i.e _id,title,author,available,checkout
any help?
[{"paramName": "_id":, "paramValue": "0"}, ... ]instead of objects