My JSON file looks like this:
{
"strings": {
"keyone": "abc",
"keytwo": "def",
}
}
Using C++,
const Json::Value strings = root["strings"];
for (int index = 0; index < strings.size(); index++)
{
std::cout << strings.isArray() << std::endl;
std::cout << strings.get(index, "ERROR") << std::endl;
}
strings.IsArray() returns 0, saying it's not an array. And the second line strings.get(index, "ERROR)", just crashes when executing, probably because I'm using it like an array when it's not.
So I'm assuming strings is just a string and not an array. How can I make it an array object?