Currently I have a JSON file (Test.json) with some valid data in json format and i'am trying to parse the data using a json object (readData) using JsonCpp, as below
Json::Value readData;
std::ifstream readFile("Test.json");
readFile >> readData;
This works fine if the json file is having valid contents in json format, but it crashes at "readFile >> readData" if the contents are not of a json format. is there any way to validate the file before assigning it to a json object in C++ ?