From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO7xj-0001xI-RR for qemu-devel@nongnu.org; Thu, 13 Mar 2014 11:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO7xb-0002Qi-Tc for qemu-devel@nongnu.org; Thu, 13 Mar 2014 11:54:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO7xb-0002QW-LH for qemu-devel@nongnu.org; Thu, 13 Mar 2014 11:54:19 -0400 Message-ID: <5321D4A7.7000007@redhat.com> Date: Thu, 13 Mar 2014 09:54:15 -0600 From: Eric Blake MIME-Version: 1.0 References: <20140228155309.28087.96600.stgit@fimbulvetr.bsc.es> <20140228155321.28087.44860.stgit@fimbulvetr.bsc.es> <87eh2mgusw.fsf@blackfin.pond.sub.org> <87d2i3z7l0.fsf@fimbulvetr.bsc.es> <8738izxpyb.fsf@blackfin.pond.sub.org> <5314C244.5070805@redhat.com> <87y50qs85q.fsf@blackfin.pond.sub.org> <20140313153355.GA5294@irqsave.net> In-Reply-To: <20140313153355.GA5294@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aIefBSwHn5ECQLWhKevFB75rONMJ4Uqce" Subject: Re: [Qemu-devel] [PATCH v4 2/3] qapi: Add a primitive to include other files from a QAPI schema file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Markus Armbruster Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aIefBSwHn5ECQLWhKevFB75rONMJ4Uqce Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/13/2014 09:33 AM, Beno=C3=AEt Canet wrote: >> We certainly can't do without comments. >> >> JSON is designed for easy data exchange, but we use it as programming >> language syntax. Its restrictions make sense for easy data exchange, >> but hurt our use. We're not the first ones experiencing that pain: >> http://json5.org/ >> >> No idea how much momentum this JSON5 thingy has... If we 's,#,//,', our comments magically fall in line with JSON5 syntax; everything else in our files is already compliant with JSON5. >> >> Switch to JSON5 and call it qapi-schema.json5? This actually seems like a rather nice idea - but due to our choice of comments, it means rewriting the bulk of the file and tweaking our parser= =2E >> >=20 > Hmm don't we want something that python and other language know how to = parse out > of the box ? Or will we write yet another delicate work of art to parse= it ? Our existing parser would only need to learn a new comment syntax to parse the subset of JSON5 that we currently actually use. Parsing FULL JSON5 would mean also learning about trailing commas, unquoted names in name:value pairs, multiline strings, and alternative numeric representations. But a point made on the JSON5 page is that ES5 JavaScript already parses JSON5, just as it already parses original JSON.= --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --aIefBSwHn5ECQLWhKevFB75rONMJ4Uqce 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/ iQEcBAEBCAAGBQJTIdSnAAoJEKeha0olJ0Nq+CsH/2EMaLDjgtiH9iYd3xMH9UUJ 2vwX/n1iCTHEDszjgDq9Yo4C8OHVBPygt0qRT+LzujrRXCxnAYg8TWk2Joy5djXq 4b2fensnnFVmDFOZ1Bn4UVtCoxyR+jn00ghp8zP5glRF4okolGYCCdMZ4PCJ4mXE /78aCMHk8NxNz8dGzj+Z1W7BCH7w+fppIKdSpjpZiUvcPOlkgWoapGuC+XX3ebXj V7HMvKRXHqPiVQJFPePoYrSQnpPiFZ9RRrVN6w/dT4quKOL93uKrq2vmXthx5pdb e1E10Qm/z6+k+xDavnK070nTXyYgdDRieeGb9rkzTa9k+Jo/Ru9I7Y0+FamqFGo= =H1jj -----END PGP SIGNATURE----- --aIefBSwHn5ECQLWhKevFB75rONMJ4Uqce--