| 61 | } |
| 62 | |
| 63 | void recursiveObjectWriter( |
| 64 | const CesiumUtility::JsonValue::Object& object, |
| 65 | JsonWriter& j) { |
| 66 | |
| 67 | j.StartObject(); |
| 68 | |
| 69 | for (const auto& [key, item] : object) { |
| 70 | j.Key(key); |
| 71 | if (item.isArray()) { |
| 72 | recursiveArrayWriter( |
| 73 | std::get<CesiumUtility::JsonValue::Array>(item.value), |
| 74 | j); |
| 75 | } |
| 76 | |
| 77 | if (item.isObject()) { |
| 78 | recursiveObjectWriter( |
| 79 | std::get<CesiumUtility::JsonValue::Object>(item.value), |
| 80 | j); |
| 81 | } |
| 82 | |
| 83 | else { |
| 84 | primitiveWriter(item, j); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | j.EndObject(); |
| 89 | } |
| 90 | } // namespace |
| 91 | |
| 92 | void writeJsonValue( |
no test coverage detected