On 08/22/2018 09:18 AM, Richard W.M. Jones wrote:
> NACK, this is not correct. null is a proper type of value in
JSON, and
> thus JSON.json_t must represent it as well.
>
> This is even used in other parts, for example the check of backing
> files of disks (see guestfs_impl_disk_has_backing_file).
Can you explain more about what a "null" JSON document looks like?
An example: qemu will accept the following substring, as part of
BlockdevOptionsGenricCOWFormat, when specifically asking qemu to ignore
the backing information present in a file and instead open the file
without any backing:
{ "backing": null }
That is, JSON has "null", "true", and "false" as its three
bare
literals, which hold the same semantic weight as literal numbers,
strings, [] arrays, and {} objects.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org