]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: json: Properly implement JSON deflattening
authorPeter Krempa <pkrempa@redhat.com>
Tue, 27 Jun 2017 11:48:56 +0000 (13:48 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 11 Jul 2017 12:13:35 +0000 (14:13 +0200)
commitd40f4b3e673cda123644c32bc815e7e2f1fc8fcd
tree7e28736623677c9aa623173fe230016b6a7ec16f
parent7f1209ad1e23f6beaaec77f18b9aa929e4bca4f7
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.
src/util/virjson.c
tests/virjsondata/deflatten-basic-generic-out.json [new file with mode: 0644]
tests/virjsondata/deflatten-concat-double-key-out.json [deleted file]
tests/virjsondata/deflatten-concat-out.json
tests/virjsondata/deflatten-deep-file-out.json
tests/virjsondata/deflatten-deep-generic-out.json [new file with mode: 0644]
tests/virjsondata/deflatten-double-key-out.json [deleted file]
tests/virjsontest.c