From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsFcd-00014R-Pq for qemu-devel@nongnu.org; Fri, 30 Oct 2015 15:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsFcZ-0005K0-88 for qemu-devel@nongnu.org; Fri, 30 Oct 2015 15:45:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsFcZ-0005Jv-2g for qemu-devel@nongnu.org; Fri, 30 Oct 2015 15:45:55 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D6AD8D9F for ; Fri, 30 Oct 2015 19:45:53 +0000 (UTC) From: Eric Blake Message-ID: <5633C8EC.8030309@redhat.com> Date: Fri, 30 Oct 2015 13:45:48 -0600 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4bSiKmqEcUmupS3u2s5BjbV6OqWGVGHcI" Subject: [Qemu-devel] RFC: libyajl for JSON List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" , Markus Armbruster , Luiz Capitulino , "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4bSiKmqEcUmupS3u2s5BjbV6OqWGVGHcI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Loaded question in response to https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06988.html, but posting as a new thread to call attention to it: Libvirt uses libyajl to parse and format JSON. Would it be worth dragging in yet another prerequisite library into qemu and reuse libyajl's parser instead of our own hand-rolled one? I know that a while ago, the answer was "as long as we support out-of-the-box builds on RHEL 5, that platform lacks yajl therefore we can't depend on it" (and libvirt's solution on RHEL 5 is "qemu doesn't support QMP and thus doesn't use JSON and thus libvirt doesn't need yajl there"). But now that we have just recently bumped the minimum glib and python versions to something not available on RHEL 5, it may also be time to start thinking about outsourcing to libyajl, because as far as I can tell, every platform that currently supports qemu out of the box has a version of libyajl. And since libvirt has already figured out the grunt work of how to simultaneously code to both the 1.x and 2.x APIs, it's not that much of a stretch to reuse that work in qemu. On the other hand, one of the "features" of qemu's hand-rolled json parser is the ability to do qobject_from_jsonf("{'foo':%s}", "bar") (that is, we extended JSON with our notion of single-quoted strings, and with our notion of %s and similar escape sequences for piecing together multiple inputs into a single input stream without having to first g_strdup_printf our pieces into a single string). I don't know if libyajl lets us add extensions to the language it parses. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4bSiKmqEcUmupS3u2s5BjbV6OqWGVGHcI 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/ iQEcBAEBCAAGBQJWM8jsAAoJEKeha0olJ0Nq1MMH/jtX2X/xjdqlSZfhSb7ahk/s 2TgZGKy1pGiSMWYgTqca3SQJNqw2zEBTE1bBPGz9BZ1sB0CtjIaL8WpaoXAb8hwL 0twDXQ27Q3NHb3NNN+jhcYwKAPmKqcHnvBtyNUkzUyC9I0OBFJrFnETNTooST1Fg QxGUogo8MJ9DxF9D0ArFfAvify0QEvHD6BNGp8QCEAddojnNbVFgrfMEaEFqkcFA NToBuvtlcuKT54Zvwmc1RgGtUE0VvFtxrbKp0vGvGsLsHnIlwNtgfJtpoiW7kF2U fprBdWWBjYsHfPiqc2i8u2lERd2PU+rGqvkUh7S35BkmeD0s+/IvMHzZX/gCLzA= =8gjp -----END PGP SIGNATURE----- --4bSiKmqEcUmupS3u2s5BjbV6OqWGVGHcI--