| 268 | } |
| 269 | |
| 270 | static Value SerializeInternal(const Value& value, int attributeTypes, SerializeStack& stack, bool dryRun) |
| 271 | { |
| 272 | if (!value.IsObject()) |
| 273 | return dryRun ? Empty : value; |
| 274 | |
| 275 | Object::Ptr input = value; |
| 276 | |
| 277 | Array::Ptr array = dynamic_pointer_cast<Array>(input); |
| 278 | |
| 279 | if (array) |
| 280 | return SerializeArray(array, attributeTypes, stack, dryRun); |
| 281 | |
| 282 | Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(input); |
| 283 | |
| 284 | if (dict) |
| 285 | return SerializeDictionary(dict, attributeTypes, stack, dryRun); |
| 286 | |
| 287 | Namespace::Ptr ns = dynamic_pointer_cast<Namespace>(input); |
| 288 | |
| 289 | if (ns) |
| 290 | return SerializeNamespace(ns, attributeTypes, stack, dryRun); |
| 291 | |
| 292 | return SerializeObject(input, attributeTypes, stack, dryRun); |
| 293 | } |
| 294 | |
| 295 | void icinga::AssertNoCircularReferences(const Value& value) |
| 296 | { |
no test coverage detected