As of 2.0 the value do not return a iterator.
See https://casablanca.codeplex.com/releases/view/119893
but you are basically missing a "as_object()" and the iter->first return a string_t and not an value.
So if you follow all the examples on the internet you will have to do something like
for (auto iter = v.as_object().cbegin(); iter != v.as_object().cend(); ++iter) {
const string_t& foo = iter->first;
const json::value& bar = iter->second;
//continue......
}
if you are sure the json value is an object
If it is an array you do
for (auto iter = v.as_array().cbegin(); iter != v.as_array.cend(); ++iter) {
}
but use the "testers" to be sure that it is an object or array.
See https://casablanca.codeplex.com/releases/view/119893
but you are basically missing a "as_object()" and the iter->first return a string_t and not an value.
So if you follow all the examples on the internet you will have to do something like
for (auto iter = v.as_object().cbegin(); iter != v.as_object().cend(); ++iter) {
const string_t& foo = iter->first;
const json::value& bar = iter->second;
//continue......
}
if you are sure the json value is an object
If it is an array you do
for (auto iter = v.as_array().cbegin(); iter != v.as_array.cend(); ++iter) {
}
but use the "testers" to be sure that it is an object or array.