[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/11] qjson: Simplify by using json-output-visi
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 08/11] qjson: Simplify by using json-output-visitor |
Date: |
Fri, 11 Dec 2015 14:45:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 11/12/2015 14:42, Eric Blake wrote:
>>> compiles and is pretty much a 1:1 translation from the qjson.c
>>> API to the visitor API (using this patch as a guide). Feel
>>> free to include it and remove qjson.c. Alternatively, you can
>>> leave out this patch and I'll test and submit the transition.
> Should I squash the two together, or keep my current patch and
> drop qjson.c as a separate patch?
As you prefer.
> Also, while reading this, I noticed that qjson.h has signatures
> that match JSON ('name' comes before 'value', when generating a
> "name":value pair), while visitor.h has signatures that are
> backwards ('obj' comes before 'name', even though the output will
> be "name":value-of-obj). I'm seriously debating about a tree-wide
> coccinelle patch to reverse the order or arguments of all the
> visit_type_* functions.
That would be doable, there aren't many users outside generated code.
Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJWatN5AAoJEL/70l94x66D8PQIAKEzIEUqjfhDMLhov4NwxGs3
LvyW+/w5AyDEZOJMayBuc3y7fSTbLp/eMQPsfBOIvBCMr/aEE4Tij0CzW3JE4FnH
IFCW94F8Q7vq8jTYKFU6222Nk7vUGOLG9y3jQSnLX4RzpRizhWjk73DtkED7YVu3
5J0Ef3+ZEobCZA9zOwQT7+pqc9ah/M6tGsZodvML2FopCk/SsTBauPjoSeP0knHE
1MJsu/KVjn1508yn1SY9d0HJKQx2dM3nzQRtp0xbWx7x8o7u826axpVQieq7YBpb
PaRW/vqiXvdnRkrCRHZAL6PJ4GLyquX42E7HjqCQjibA06fbtqmLoYQA2A/2Pyg=
=EJIn
-----END PGP SIGNATURE-----
- [Qemu-devel] [RFC PATCH 00/11] Add qapi-to-JSON output visitor, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 02/11] qapi: Improve use of qmp/types.h, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 04/11] qapi: Factor out JSON number formatting, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 03/11] qapi: Factor out JSON string escaping, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 05/11] qapi: Use qstring_append_chr() where appropriate, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 08/11] qjson: Simplify by using json-output-visitor, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 09/11] qapi: Add qobject_to_json_pretty_prefix(), Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 10/11] qapi: Support pretty printing in JSON output visitor, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 01/11] qapi: Rename qjson.h to qobject-json.h, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 06/11] qapi: Add qstring_append_format(), Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 07/11] qapi: add json output visitor, Eric Blake, 2015/12/10
- [Qemu-devel] [PATCH 11/11] RFC: qemu-img: Use new JSON output formatter, Eric Blake, 2015/12/10