From a193352ff9c7cd2cd07846118bc49921d0f53af8 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 3 Jul 2018 10:53:47 +0200 Subject: qobject: New qdict_from_jsonf_nofail() Many uses of qobject_from_jsonf() convert JSON objects. Create new convenience function qdict_from_jsonf_nofail() that includes the conversion to QDict. The next few commits will put it to use. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-22-armbru@redhat.com> --- include/qapi/qmp/qjson.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/qapi/qmp/qjson.h') diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h index b274ac3..43b2ce2 100644 --- a/include/qapi/qmp/qjson.h +++ b/include/qapi/qmp/qjson.h @@ -19,6 +19,8 @@ QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2); QObject *qobject_from_jsonv(const char *string, va_list *ap, Error **errp) GCC_FMT_ATTR(1, 0); +QDict *qdict_from_jsonf_nofail(const char *string, ...) GCC_FMT_ATTR(1, 2); + QString *qobject_to_json(const QObject *obj); QString *qobject_to_json_pretty(const QObject *obj); -- cgit v1.1