TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ from_json() [10/19]

template<typename BasicJsonType , typename Key , typename Value , typename Hash , typename KeyEqual , typename Allocator , typename = enable_if_t < !std::is_constructible < typename BasicJsonType::string_t, Key >::value >>
void nlohmann::detail::from_json ( const BasicJsonType &  j,
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > &  m 
)

Definition at line 4311 of file json.hpp.

4312{
4313 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
4314 {
4315 JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j));
4316 }
4317
4318 m.clear();
4319
4320 for (const auto &p : j)
4321 {
4322 if (JSON_HEDLEY_UNLIKELY(!p.is_array()))
4323 {
4324 JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()), j));
4325 }
4326
4327 m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());
4328 }
4329}