+const json::Reader<gltf2::Mesh::Extras>& GetMeshExtrasReader()
+{
+ static const auto MESH_EXTRAS_READER = std::move(json::Reader<gltf2::Mesh::Extras>()
+ .Register(*json::MakeProperty("targetNames", json::Read::Array<std::string_view, json::Read::StringView>, &gltf2::Mesh::Extras::mTargetNames)));
+ return MESH_EXTRAS_READER;
+}
+
+std::vector<std::string_view> ReadMeshExtensionsTargetsName(const json_value_s& j)
+{
+ auto& jsonObject = json::Cast<json_object_s>(j);
+ std::vector<std::string_view> result;
+
+ auto element = jsonObject.start;
+ while(element)
+ {
+ auto jsonString = *element->name;
+ uint32_t index = json::Read::Number<uint32_t>(*element->value);
+
+ if(result.size() <= index)
+ {
+ result.resize(index + 1u);
+ }
+
+ result[index] = json::Read::StringView(jsonString);
+
+ element = element->next;
+ }
+ return result;
+}
+
+const json::Reader<gltf2::Mesh::Extensions>& GetMeshExtensionsReader()
+{
+ static const auto MESH_EXTENSIONS_READER = std::move(json::Reader<gltf2::Mesh::Extensions>()
+ .Register(*json::MakeProperty("SXR_targets_names", ReadMeshExtensionsTargetsName, &gltf2::Mesh::Extensions::mSXRTargetsNames))
+ .Register(*json::MakeProperty("avatar_shape_names", ReadMeshExtensionsTargetsName, &gltf2::Mesh::Extensions::mAvatarShapeNames)));
+ return MESH_EXTENSIONS_READER;
+}
+