| 37 | } |
| 38 | |
| 39 | void GLTF::Object::writeJSON(void* writer, GLTF::Options* options) { |
| 40 | rapidjson::Writer<rapidjson::StringBuffer>* jsonWriter = (rapidjson::Writer<rapidjson::StringBuffer>*)writer; |
| 41 | if (this->name.length() > 0) { |
| 42 | jsonWriter->Key("name"); |
| 43 | jsonWriter->String(this->name.c_str()); |
| 44 | } |
| 45 | if (this->extensions.size() > 0) { |
| 46 | jsonWriter->Key("extensions"); |
| 47 | jsonWriter->StartObject(); |
| 48 | for (const auto extension : this->extensions) { |
| 49 | jsonWriter->Key(extension.first.c_str()); |
| 50 | jsonWriter->StartObject(); |
| 51 | extension.second->writeJSON(writer, options); |
| 52 | jsonWriter->EndObject(); |
| 53 | } |
| 54 | jsonWriter->EndObject(); |
| 55 | } |
| 56 | if (this->extras.size() > 0) { |
| 57 | jsonWriter->Key("extras"); |
| 58 | jsonWriter->StartObject(); |
| 59 | for (const auto extra : this->extras) { |
| 60 | jsonWriter->Key(extra.first.c_str()); |
| 61 | jsonWriter->StartObject(); |
| 62 | extra.second->writeJSON(writer, options); |
| 63 | jsonWriter->EndObject(); |
| 64 | } |
| 65 | jsonWriter->EndObject(); |
| 66 | } |
| 67 | } |
nothing calls this directly
no outgoing calls
no test coverage detected