From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40690 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxJo9-00079p-Rr for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:52:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxJo7-0001Q2-Pe for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:52:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxJo7-0001Ps-Gk for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:52:07 -0500 Message-ID: <4D7785FE.6050101@redhat.com> Date: Wed, 09 Mar 2011 15:51:58 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command References: <1299460984-15849-1-git-send-email-aliguori@us.ibm.com> <1299460984-15849-15-git-send-email-aliguori@us.ibm.com> <4D74E08F.3080309@codemonkey.ws> <4D778094.8060803@redhat.com> <4D778459.9020406@codemonkey.ws> In-Reply-To: <4D778459.9020406@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Adam Litke , Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino On 03/09/2011 03:44 PM, Anthony Liguori wrote: >>> Yeah, it's only loosely JSON as I don't use a JSON parser. >> >> Goes kind of against all the buzzwords you're letting fly here... > > > The schema defines arguments in a dictionary because in QMP, the > argument order doesn't matter. But the argument order matters in C so > I need to use a custom parser to preserve dictionary order. We could extend our parser to annotate the dictionary with the original order. Not worth it though. > > There's no way to do commenting in JSON and I really wanted to have > inline documentation. > > But otherwise, it's valid JSON. > We should then have a transformation that generates a valid json for clients to use. We could even include the documentation as a 'doc': key. -- error compiling committee.c: too many arguments to function