]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: json: Allow converting a virTristate(Bool|Switch) into JSON
authorPeter Krempa <pkrempa@redhat.com>
Thu, 16 Aug 2018 14:19:22 +0000 (16:19 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2018 11:46:29 +0000 (13:46 +0200)
commit68ecbca5d30ba58722152c0b4f252d76341917f1
tree4d52fda1aa18e74340d083a0777603f9f063c999
parent350e238f6320def4e7ee6c2c05a6961f6897bc4c
util: json: Allow converting a virTristate(Bool|Switch) into JSON

Add a new modifier letter for virJSONValueObjectAddVArgs which will add
a boolean value with our tristate semantics. The value is omitted when
the _ABSENT value is used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virjson.c