All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 00/11] Add qapi-to-JSON output visitor
@ 2015-12-10 23:53 Eric Blake
  2015-12-10 23:53   ` [Qemu-devel] " Eric Blake
                   ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Eric Blake @ 2015-12-10 23:53 UTC (permalink / raw)
  To: qemu-devel

I wrote this series for several reasons:
1. I've been doing a lot of churn in the qapi visitor interfaces
lately; adding a new visitor is good proof whether the changes
still make sense
2. Alexander ended up writing his own simple JSON generator as
qjson.c in his work for vmstate self-description, rather than
reusing existing code, because the QObject JSON generator does
not have an easy entry point
3. Fam commented while trying to enhance 'qemu-img map' that we
are rather wasteful in that there is no way to go directly from
a qapi type to JSON without an intermediate QObject creation

RFC because it conflicts with other pending qemu-img patches:
https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01756.html
and because I still have testsuite failures in qemu-iotests that
must be addressed before the series can be applied (some output
reordering occurs, but it also flushed out some clients that are
abusing qapi visits by expecting NULL to turn into "").  Posting
now to at least get feedback on whether the ideas make sense.

Pending prerequisites:
+ Markus' qapi-not-next branch (including my qapi subset D patches):
http://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qapi-not-next
https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00463.html
+ v8 or later of my qapi subset E patches (at the time of this mail,
only v7 has been posted):
https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01181.html

Also available as a tag at this location (with prerequisites applied):
git fetch git://repo.or.cz/qemu/ericb.git qapi-jsonv1

Eric Blake (11):
  qapi: Rename qjson.h to qobject-json.h
  qapi: Improve use of qmp/types.h
  qapi: Factor out JSON string escaping
  qapi: Factor out JSON number formatting
  qapi: Use qstring_append_chr() where appropriate
  qapi: Add qstring_append_format()
  qapi: add json output visitor
  qjson: Simplify by using json-output-visitor
  qapi: Add qobject_to_json_pretty_prefix()
  qapi: Support pretty printing in JSON output visitor
  RFC: qemu-img: Use new JSON output formatter

 MAINTAINERS                                   |   2 +-
 balloon.c                                     |   2 +-
 block.c                                       |   2 +-
 block/archipelago.c                           |   2 +-
 block/nbd.c                                   |   2 +-
 block/quorum.c                                |   2 +-
 blockjob.c                                    |   2 +-
 hw/core/qdev.c                                |   2 +-
 hw/misc/pvpanic.c                             |   2 +-
 hw/net/virtio-net.c                           |   2 +-
 hw/pci/pcie_aer.c                             |   1 +
 include/qapi/json-output-visitor.h            |  25 ++
 include/qapi/qmp/{qjson.h => qobject-json.h}  |   1 +
 include/qapi/qmp/qstring.h                    |  12 +-
 include/qapi/qmp/types.h                      |   1 -
 monitor.c                                     |   8 +-
 qapi/Makefile.objs                            |   2 +-
 qapi/json-output-visitor.c                    | 221 ++++++++++++
 qapi/qmp-dispatch.c                           |   1 +
 qapi/qmp-event.c                              |   2 +-
 qemu-img.c                                    |  70 ++--
 qga/main.c                                    |   2 +-
 qjson.c                                       |  64 ++--
 qobject/Makefile.objs                         |   3 +-
 qobject/json-parser.c                         |  14 +-
 qobject/{qjson.c => qobject-json.c}           | 147 ++------
 qobject/qobject.c                             |   7 +-
 qobject/qstring.c                             | 119 ++++++-
 target-s390x/kvm.c                            |   2 +-
 tests/.gitignore                              |   3 +-
 tests/Makefile                                |  12 +-
 tests/{check-qjson.c => check-qobject-json.c} |  86 ++++-
 tests/libqtest.c                              |   2 +-
 tests/test-json-output-visitor.c              | 474 ++++++++++++++++++++++++++
 tests/test-qmp-input-strict.c                 |   1 +
 tests/test-qmp-input-visitor.c                |   1 +
 tests/test-qmp-output-visitor.c               |   1 +
 tests/test-visitor-serialization.c            |   1 +
 ui/spice-core.c                               |   2 +-
 vl.c                                          |   2 +-
 40 files changed, 1046 insertions(+), 261 deletions(-)
 create mode 100644 include/qapi/json-output-visitor.h
 rename include/qapi/qmp/{qjson.h => qobject-json.h} (90%)
 create mode 100644 qapi/json-output-visitor.c
 rename qobject/{qjson.c => qobject-json.c} (50%)
 rename tests/{check-qjson.c => check-qobject-json.c} (95%)
 create mode 100644 tests/test-json-output-visitor.c

-- 
2.4.3

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-12-18 23:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 23:53 [Qemu-devel] [RFC PATCH 00/11] Add qapi-to-JSON output visitor Eric Blake
2015-12-10 23:53 ` [PATCH 01/11] qapi: Rename qjson.h to qobject-json.h Eric Blake
2015-12-10 23:53   ` [Qemu-devel] " Eric Blake
2015-12-11 11:00   ` Paolo Bonzini
2015-12-11 11:00     ` [Qemu-devel] " Paolo Bonzini
2015-12-10 23:53 ` [Qemu-devel] [PATCH 02/11] qapi: Improve use of qmp/types.h Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 03/11] qapi: Factor out JSON string escaping Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 04/11] qapi: Factor out JSON number formatting Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 05/11] qapi: Use qstring_append_chr() where appropriate Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 06/11] qapi: Add qstring_append_format() Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 07/11] qapi: add json output visitor Eric Blake
2015-12-11  0:24   ` Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 08/11] qjson: Simplify by using json-output-visitor Eric Blake
2015-12-11 11:10   ` Paolo Bonzini
2015-12-11 13:42     ` Eric Blake
2015-12-11 13:45       ` Paolo Bonzini
2015-12-18 23:06     ` Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 09/11] qapi: Add qobject_to_json_pretty_prefix() Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 10/11] qapi: Support pretty printing in JSON output visitor Eric Blake
2015-12-10 23:53 ` [Qemu-devel] [PATCH 11/11] RFC: qemu-img: Use new JSON output formatter Eric Blake
2015-12-11  1:36   ` Fam Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.