From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdKne-0000V9-Hl for qemu-devel@nongnu.org; Wed, 01 Apr 2015 11:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdKna-0001GP-1t for qemu-devel@nongnu.org; Wed, 01 Apr 2015 11:43:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdKnZ-0001GJ-SU for qemu-devel@nongnu.org; Wed, 01 Apr 2015 11:43:21 -0400 Message-ID: <551C1218.1070100@redhat.com> Date: Wed, 01 Apr 2015 09:43:20 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427227433-5030-1-git-send-email-eblake@redhat.com> <1427227433-5030-18-git-send-email-eblake@redhat.com> <20150331152359.GC4748@noname.redhat.com> <87sicl2akl.fsf@blackfin.pond.sub.org> <20150401083150.GB3593@noname.str.redhat.com> <87vbhgur9x.fsf@blackfin.pond.sub.org> <551BE1ED.3010707@redhat.com> In-Reply-To: <551BE1ED.3010707@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uiXLj5RcMnx1SjRF8VCFORNU2PiEb5rNw" Subject: Re: [Qemu-devel] [PATCH v5 17/28] qapi: Allow true, false and null in schema json List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Kevin Wolf Cc: famz@redhat.com, qemu-devel@nongnu.org, wenchaoqemu@gmail.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uiXLj5RcMnx1SjRF8VCFORNU2PiEb5rNw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/01/2015 06:17 AM, Eric Blake wrote: >> I guess JSON / Python was chosen as QAPI schema language to save us th= e >> bother of defining a syntax and building the tools to work with it, li= ke >> an Emacs mode. JSON's not exactly my favourite choice, but at least >> it's not XML. >> >> What we have now isn't JSON, but it's still a subset of Python, and th= e >> Python tools work. If we go beyond Python, they'll break. >=20 > Well, we were a subset of Python, until this patch added true, false, > and null (the Python way would have been True, False, and None). We ar= e > also similar to JSON5, http://json5.org/ >=20 > Among other things, JSON5 allows trailing commas, allows unquoted keys > in a dictionary, allows single-quoted strings, and allows C-style comme= nts. Another thing I just noticed: JSON allows '\u0061' as a synonym for the one-byte string 'a', but our parser does not (instead, our parser treats it like the five bytes 'u0061'). I guess we haven't noticed, since qapi has never needed non-ascii names... > Since we're not quite python or JSON, we've already rolled our own > parser; so rewriting QAPI to use a syntax of our own choosing is not > that much of a leap. But not for this series. So of course this still holds, and I won't stall my v6 posting because of it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --uiXLj5RcMnx1SjRF8VCFORNU2PiEb5rNw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVHBIYAAoJEKeha0olJ0NqULkH/2qerPMLsGOTqAzCrKZL703V NlTuHWsGNhqwjSpb8yfdri+K4gzeYe8iv61/CwOKUE2KOekxgztEb9rIG3iNkS4u Bzcs7hSgMG1k/+0H1TND4RDzqKfSYEmjsLVp6iFVV5NUW4Ii8lST8ZrKzpu7tNs9 NGIDFHfB5j/zeQXKln4aa4PeDOTx6mEw3qgNqrXfkQOSSgzce+EBeU+401tH8zWg LqwIVqE/XVbtGpZUM6GYczrOBxOZ1lpOOuqgKgzQMNt5tAgopm4fWRI5cgVwgEZN RM9mxAB0zxKV2FKN7XsKpY/t7ooJzPb4NebEacKNlvMLzUOHHTo9JxyUnHikU7g= =uXYe -----END PGP SIGNATURE----- --uiXLj5RcMnx1SjRF8VCFORNU2PiEb5rNw--