Here's my attempt to merge the best points of Markus' approach [1] (patches 16-18 of that series - benefit of smaller patches and fewer malloc calls) and my approach [2] (benefit of a testsuite addition and more detailed commit messages), while fixing the typos that both of us had in v1.
[1]https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00342.html [2]https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00623.html Eric Blake (1): json-parser: Accept 'null' in QMP Markus Armbruster (2): qobject: Clean up around qtype_code qobject: Add a special null QObject block/qapi.c | 3 --- include/hw/qdev-core.h | 2 +- include/qapi/qmp/qobject.h | 13 +++++++++++-- qobject/Makefile.objs | 2 +- qobject/json-parser.c | 2 ++ qobject/qjson.c | 6 ++++-- qobject/qnull.c | 29 +++++++++++++++++++++++++++++ tests/check-qjson.c | 15 +++++++++++++-- 8 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 qobject/qnull.c -- 2.1.0