[libvirt] [PATCH v5 2/9] util: add functions for interating over json object

Eric Blake eblake at redhat.com
Tue May 1 20:59:50 UTC 2012


On 04/20/2012 10:01 AM, Dmitry Guryanov wrote:
> Add function virJSONValueObjectKeysNumber, virJSONValueObjectGetKey
> and virJSONValueObjectGetValue, which allow you to iterate over all
> fields of json object: you can get number of fields and then get
> name and value, stored in field with that name by index.
> 
> Signed-off-by: Dmitry Guryanov <dguryanov at parallels.com>
> ---
>  src/util/json.c |   30 ++++++++++++++++++++++++++++++
>  src/util/json.h |    4 ++++
>  2 files changed, 34 insertions(+), 0 deletions(-)

Seems like this might be independently useful.  ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120501/8c7fa165/attachment-0001.sig>


More information about the libvir-list mailing list