There is a built-in method in json_spirit to deliver default values when a parameter is missing in the JSON. Change the horrible if (jsonString.contains(...)) statements for proper json_spirit default values.
std::string name = jsonString.getString("name", "I have no name");
There is a built-in method in json_spirit to deliver default values when a parameter is missing in the JSON. Change the horrible
if (jsonString.contains(...))
statements for proper json_spirit default values.