| 238 | } |
| 239 | |
| 240 | void RewriteConfigToText(JSONValue& node, JSONDocument::AllocatorType& allocator, |
| 241 | const char* target_type) { |
| 242 | if (node.IsObject()) { |
| 243 | auto type_member = node.FindMember("type"); |
| 244 | auto file_member = node.FindMember("file"); |
| 245 | if (type_member != node.MemberEnd() && file_member != node.MemberEnd()) { |
| 246 | RewriteDictNode(node, allocator, target_type); |
| 247 | } |
| 248 | |
| 249 | for (auto it = node.MemberBegin(); it != node.MemberEnd(); ++it) { |
| 250 | RewriteConfigToText(it->value, allocator, target_type); |
| 251 | } |
| 252 | return; |
| 253 | } |
| 254 | |
| 255 | if (node.IsArray()) { |
| 256 | for (auto& child : node.GetArray()) { |
| 257 | RewriteConfigToText(child, allocator, target_type); |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | void RewriteSegmentationResourcesToAbsolute( |
| 263 | JSONValue& node, JSONDocument::AllocatorType& allocator, |
no test coverage detected