JsonCpp - when having a json::Value object, how can i know it's key name? JsonCpp - when having a json::Value object, how can i know it's key name? json json

JsonCpp - when having a json::Value object, how can i know it's key name?


You can use Json::Value::getMemberNames() to iterate through the names.

Json::Value value;for (auto const& id : value.getMemberNames()) {    std::cout << id << std::endl;}


You need an up-pointer? It's not a bad idea, but adding a field for the up-pointer would break binary-compatibility (which is very important). So yes, you need to wrap it.

Currently, a sub-value is just a Value, like any other.