mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
util: json: Add accessor for looking up JSON value type
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
38b3b20c66
commit
57cd22bc54
@ -2041,6 +2041,7 @@ virJSONValueGetNumberLong;
|
||||
virJSONValueGetNumberUint;
|
||||
virJSONValueGetNumberUlong;
|
||||
virJSONValueGetString;
|
||||
virJSONValueGetType;
|
||||
virJSONValueHashFree;
|
||||
virJSONValueIsArray;
|
||||
virJSONValueIsNull;
|
||||
|
@ -68,6 +68,13 @@ struct _virJSONParser {
|
||||
};
|
||||
|
||||
|
||||
virJSONType
|
||||
virJSONValueGetType(const virJSONValue *value)
|
||||
{
|
||||
return value->type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virJSONValueObjectAddVArgs:
|
||||
* @obj: JSON object to add the values to
|
||||
|
@ -83,6 +83,8 @@ struct _virJSONValue {
|
||||
void virJSONValueFree(virJSONValuePtr value);
|
||||
void virJSONValueHashFree(void *opaque, const void *name);
|
||||
|
||||
virJSONType virJSONValueGetType(const virJSONValue *value);
|
||||
|
||||
int virJSONValueObjectCreate(virJSONValuePtr *obj, ...)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
|
||||
int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args)
|
||||
|
Loading…
Reference in New Issue
Block a user