From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxK8p-0004d8-Ld for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:13:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxK8o-0007Ju-4W for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:13:31 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:56154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxK8o-0007Jm-00 for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:13:30 -0500 Received: by iym7 with SMTP id 7so651172iym.4 for ; Wed, 09 Mar 2011 06:13:29 -0800 (PST) Message-ID: <4D778B07.6020706@codemonkey.ws> Date: Wed, 09 Mar 2011 08:13:27 -0600 From: Anthony Liguori 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> <4D7785FE.6050101@redhat.com> In-Reply-To: <4D7785FE.6050101@redhat.com> 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: Avi Kivity Cc: Stefan Hajnoczi , Luiz Capitulino , Adam Litke , Markus Armbruster , qemu-devel@nongnu.org On 03/09/2011 07:51 AM, Avi Kivity wrote: > 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. Yes, as I mentioned on the call, that's my plan for 0.15. I hadn't thought about the doc bit though. Regards, Anthony Liguori