Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virjson.c | 8 ++++++++
src/util/virjson.h | 2 ++
3 files changed, 11 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index f6897915ce..9d98ee54df 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2093,6 +2093,7 @@ virJSONValueObjectIsNull;
virJSONValueObjectKeysNumber;
virJSONValueObjectRemoveKey;
virJSONValueObjectStealArray;
+virJSONValueObjectStealObject;
virJSONValueToString;
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 3ddefc34ca..dfe00d9280 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -1400,6 +1400,14 @@ virJSONValueObjectStealArray(virJSONValuePtr object, const char
*key)
}
+virJSONValuePtr
+virJSONValueObjectStealObject(virJSONValuePtr object,
+ const char *key)
+{
+ return virJSONValueObjectStealByType(object, key, VIR_JSON_TYPE_OBJECT);
+}
+
+
int
virJSONValueObjectIsNull(virJSONValuePtr object,
const char *key)
diff --git a/src/util/virjson.h b/src/util/virjson.h
index f7283dcf97..0f098892b4 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -112,6 +112,8 @@ virJSONValuePtr virJSONValueObjectGetArray(virJSONValuePtr object,
const char *key);
virJSONValuePtr virJSONValueObjectStealArray(virJSONValuePtr object,
const char *key);
+virJSONValuePtr virJSONValueObjectStealObject(virJSONValuePtr object,
+ const char *key);
const char *virJSONValueObjectGetString(virJSONValuePtr object, const char *key);
const char *virJSONValueObjectGetStringOrNumber(virJSONValuePtr object, const char
*key);
--
2.17.0