4289{
4290 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
4291 {
4292 JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j));
4293 }
4294
4295 m.clear();
4296
4297 for (const auto &p : j)
4298 {
4299 if (JSON_HEDLEY_UNLIKELY(!p.is_array()))
4300 {
4301 JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()), j));
4302 }
4303
4304 m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());
4305 }
4306}