Re: [PATCH v6 2/9] util: add functions for interating over json object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/03/2012 04:10 AM, Daniel P. Berrange wrote:
> On Wed, May 02, 2012 at 10:32:37PM +0400, 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@xxxxxxxxxxxxx>

>> +int virJSONValueObjectKeysNumber(virJSONValuePtr object);
>> +const char *virJSONValueObjectGetKey(virJSONValuePtr object, unsigned int n);
>> +virJSONValuePtr virJSONValueObjectGetValue(virJSONValuePtr object, unsigned int n);
>> +
>>  const char *virJSONValueGetString(virJSONValuePtr object);
>>  int virJSONValueGetNumberInt(virJSONValuePtr object, int *value);
>>  int virJSONValueGetNumberUint(virJSONValuePtr object, unsigned int *value);
> 
> ACK to adding this API to GIT now, regardless of the other patches
> 
> Though having said that when pushing, we should be sure to add the
> 3 new symbols to libvirt_private.syms

I added that, and pushed this patch.

I agree with the decision to hold off on the rest of the series until
after the actual hypervisor is available to target.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]