Received: from eggs.gnu.org ([2001:4830:134:3::10]:53671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8vTw-0008Gj-Kc for qemu-devel@nongnu.org; Mon, 21 Nov 2016 15:46:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8vTt-0006OG-Ib for qemu-devel@nongnu.org; Mon, 21 Nov 2016 15:46:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43804) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c8vTt-0006O2-8T for qemu-devel@nongnu.org; Mon, 21 Nov 2016 15:46:25 -0500 References: <673F175E-AF65-4F4F-9895-C7335A36AC29@gmail.com> <8b136de6-490a-d194-b7a6-eabfb87daf2c@redhat.com> <16AF327F-E1FE-4F2E-9919-A474276474FF@gmail.com> <182f25fb-98bd-73db-62f3-ff18b30a49cd@redhat.com> From: Eric Blake Message-ID: <3c5fdd4e-da35-46d9-9c64-a1a269f41646@redhat.com> Date: Mon, 21 Nov 2016 14:46:22 -0600 MIME-Version: 1.0 In-Reply-To: <182f25fb-98bd-73db-62f3-ff18b30a49cd@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1x1Jw0pVDGF79GEH4jN54cmxv5QoJ5DMM" Subject: Re: [Qemu-devel] qobject/qjson.c:69: failed assertion `obj != NULL' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: G 3 , Paolo Bonzini , Markus Armbruster Cc: qemu-devel qemu-devel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1x1Jw0pVDGF79GEH4jN54cmxv5QoJ5DMM From: Eric Blake To: G 3 , Paolo Bonzini , Markus Armbruster Cc: qemu-devel qemu-devel Message-ID: <3c5fdd4e-da35-46d9-9c64-a1a269f41646@redhat.com> Subject: Re: [Qemu-devel] qobject/qjson.c:69: failed assertion `obj != NULL' References: <673F175E-AF65-4F4F-9895-C7335A36AC29@gmail.com> <8b136de6-490a-d194-b7a6-eabfb87daf2c@redhat.com> <16AF327F-E1FE-4F2E-9919-A474276474FF@gmail.com> <182f25fb-98bd-73db-62f3-ff18b30a49cd@redhat.com> In-Reply-To: <182f25fb-98bd-73db-62f3-ff18b30a49cd@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/21/2016 02:36 PM, Eric Blake wrote: > but I'd argue that using qobject_from_jsonf() is already less-than-usef= ul. In fact, we are down to only a handful of users of our modified 'jsonf' format (that is, strings that mix JSON with % modifiers): hw/pci/pcie_aer.c: build a 5-element QDict monitor.c: build a 1-element QDict which contains a 2-element QDict qapi/qmp-dispatch.c: build a 2-element QDict qapi/qmp-event.c: Build a 2-element QDict plus the testsuite (check-qjson.c). > It's hard to argue that the > complexity of maintaining our pseudo-printf JSON parser for constructin= g > a QObject with one line is worth the effort compared to the three or > four lines to construct the same QObject by hand. I'm severely tempted to just rip out all of the poorly-underdocumented % parsing from the JSON parser, as it will simplify our code, without much pain in converting the four real users to just manually build up the same objects. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --1x1Jw0pVDGF79GEH4jN54cmxv5QoJ5DMM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYM10eAAoJEKeha0olJ0NqCk0H/RDxG+rC9BPV6Rm80gMJHfQw ZxYXjP/XpE0BprS2VYn2q6cDN+MonrvTb8MqhILlC8WrBH9uyXuFGe2ZdSoQ4AEW O7ZJR2yYh+I3K+Sn29JK4aaxhiPVlfOmU/7AXGjcXNE3eLPo8AW0I0UFj+owKUqM 3RJRCX/gdL/ZgEx+AM1LRg3PyfU+UwmWHS2p2DqvAvEZ0DOR8NwkjxP/B4gsCtDW PXB7UidcHzS9EgeWEsbJfFYx2qUL05jqT5jHY5UN8fS2s74t/lHwAlrYr3IzGtEQ IgTnJo4EyyxZHKqSIKTBZtnxmzs5vw2ZszfEhx01lGenVXiQFEawkJm7SAM1Vss= =vQre -----END PGP SIGNATURE----- --1x1Jw0pVDGF79GEH4jN54cmxv5QoJ5DMM--