Found this
Taking a look at the changelog for version 2.0.0, you'll find this:
Breaking Change - Changed how iteration over json arrays and objects is performed. No longer is an iterator of std::pair returned. Instead there is a separate iterator for arrays and objects on the json::array and json::object class respectively. This allows us to make performance improvements and continue to adjust accordingly. The array iterator returns json::values, and the object iterator now returns std::pair.
so I changed my code to this
for (auto &iter = jsonValue2.as_array().cbegin(); iter != jsonValue2.as_array().cend(); ++iter)
{
json::value v = iter[0];
std::wcout << v.at(U("artist")).as_string() << L": " << v.at(U("id")) << std::endl;
}
and all is good - so the exception was trying to iterate over a json::object instead of json::array