I have a sample.json with values and an array of values. I'm currently using Json library to parse the json file and read the contents into C++ code. I know how to read a value but not sure about reading an array
Below is the content of sample.json file.
"steering_facts" :
{
"SteerPolynomial": [0.0, 0.0, -0.0006148, 0.025, 16.24, -0.3823],
"SteerRatio" : 0.0
}
Here i can read "SteerRatio" with the help of below code.
static Json::Value jsonValues;
if (jsonValues.isMember("steering_facts")){
float steerRatio = jsonValues["steering_facts"]["SteerRatio"].asFloat();
}
But not sure how to read SteerPolynomial array.