42 constexpr auto n = glm_component_count<T>();
44 throw nlohmann::json::type_error::create(302,
"expected array for glm type", &j);
48 throw nlohmann::json::other_error::create(501,
49 "glm component count mismatch: expected "
50 + std::to_string(n) +
", got " + std::to_string(j.size()),
54 using Comp = glm_component_type<T>;
56 for (
size_t i = 0; i < n; ++i)
57 ptr[i] = j[i].get<Comp>();