qemu_monitor_json: Properly check "return" type
qemu_monitor_json: Properly check "return" type

My commit 2e0d6cdec41 claimed qemuMonitorJSONCheckError guarantees
"return" object exists in the JSON reply. But it only makes sure the key
is there, while the type of the value is not checked. A lot of callers
do not care since they only want to see whether their QMP command failed
or not, but any caller which needs to read some data from the reply
wants to make sure the correct data type was returned.

This patch adds a new API called qemuMonitorJSONCheckReply which calls
qemuMonitorJSONCheckError and checks "return" contains a value of the
specified type.

Signed-off-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>

olafhering/libvirt,olafhering/libvirt,crobinso/libvirt,andreabolognani/libvirt,libvirt/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,jfehlig/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,nertpinx/libvirt,crobinso/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,crobinso/libvirt,olafhering/libvirt,nertpinx/libvirt,zippy2/libvirt,nertpinx/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,jardasgit/libvirt,eskultety/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,andreabolognani/libvirt,zippy2/libvirt,libvirt/libvirt,libvirt/libvirt,libvirt/libvirt,eskultety/libvirt,zippy2/libvirt,jfehlig/libvirt,andreabolognani/libvirt,eskultety/libvirt,jardasgit/libvirt,jfehlig/libvirt,crobinso/libvirt,nertpinx/libvirt,jardasgit/libvirt,eskultety/libvirt,eskultety/libvirt