libvirt/tests/virjsondata/deflatten-nested-out.json
Peter Krempa 428d175206 util: json: Recursively deflatten objects virJSONValueObjectDeflatten
If a value of the first level object contains more objects needing
deflattening which would be wrapped in an actual object the function
would not recurse into them.

By this simple addition we can fully deflatten the objects.
2017-07-11 14:20:05 +02:00

29 lines
570 B
JSON

{
"file": {
"nest": {
"even": {
"objects": "can",
"contain": "some",
"more": {
"deeply": {
"nested": "objects",
"needing": "deflattening",
"some": {
"even": "more",
"than": {
"others": {
"thought": {
"was": "even",
"completely": "necessary"
}
}
}
}
},
"perhaps": "flat value"
}
}
}
}
}