From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJXeQ-0004By-96 for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:56:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJXeL-0004A2-6W for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:56:53 -0400 Received: from [199.232.76.173] (port=48644 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJXeK-00049t-GT for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:56:48 -0400 Received: from mx20.gnu.org ([199.232.41.8]:25904) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJXeJ-0008S1-SE for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:56:48 -0400 Received: from mail2.shareable.org ([80.68.89.115]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJXeJ-0004wk-5m for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:56:47 -0400 Date: Wed, 24 Jun 2009 19:56:45 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file Message-ID: <20090624185645.GP14121@shareable.org> References: <4A412659.1080803@us.ibm.com> <20090623220204.GA5612@snarc.org> <4A415C30.7030301@us.ibm.com> <20090624010108.GA6537@snarc.org> <4A42200C.6060600@codemonkey.ws> <4A422592.2000307@redhat.com> <20090624162207.GD14121@shareable.org> <20090624173915.GA16973@snarc.org> <5b31733c0906241123w14dde78dk670ff8f5f83f4c97@mail.gmail.com> <20090624184215.GA17394@snarc.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090624184215.GA17394@snarc.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincent Hanquez Cc: ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , Filip Navara , Avi Kivity Vincent Hanquez wrote: > On Wed, Jun 24, 2009 at 08:23:06PM +0200, Filip Navara wrote: > > On Wed, Jun 24, 2009 at 7:39 PM, Vincent Hanquez wrote: > > > On Wed, Jun 24, 2009 at 05:22:07PM +0100, Jamie Lokier wrote: > > >> You can code a minimal XML parser in straight C quite easily, if it's > > >> a restricted subset. > > > > > > even the restricted subset is not as straighforward as a json parser. and > > > usually using a subset means you can't interact correctly with the one that > > > does the full spec. > > > > > >> XML and JSON both have the same ugly problem with binary data: they > > >> can't carry it.  It's usually base64 encoded.  Then again the QEMU > > >> monitor is no better this respect :-) > > > > > > JSon ***DOES*** do binary data. > > > > > > C String "abc\0\xff" -> Json String "abc\0000\00ff" > > btw, sorry i meant \\ instead of \ in the json string. > as in: 'a' 'b' 'c' '\\' '0' '0' '0' '0' '\\' '0' '0' 'f' 'f' Wow. So a JSON string is actually _larger_ than an array of numbers, for some binary data? As in: "abc\\0000\\00ff" versus [97,98,99,0,255] Heh :-) -- Jamie