libvirt/tests/virjsondata/deflatten-deep-generic-out.json
Peter Krempa d40f4b3e67 util: json: Properly implement JSON deflattening
As it turns out sometimes users pass in an arbitrarily nested structure
e.g. for the qemu backing chains JSON pseudo protocol. This new
implementation deflattens now a single object fully even with nested
keys.

Additionally it's not necessary now to stick with the "file." prefix for
the properties.
2017-07-11 14:13:35 +02:00

28 lines
386 B
JSON

{
"foo": {
"double": {
"nest1": "some",
"nest2": "more"
},
"very": {
"deeply": {
"nested": {
"object": {
"chains": {
"nest1": "some",
"nest2": "stuff"
}
}
}
}
}
},
"bar": {
"double": {
"nest3": {
"even": "objects"
}
}
}
}