From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54911 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxJhK-0002pU-BV for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:45:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxJhF-0006k9-Np for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:45:05 -0500 Received: from mail-iw0-f173.google.com ([209.85.214.173]:43771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxJhF-0006gx-I0 for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:45:01 -0500 Received: by iwl42 with SMTP id 42so617655iwl.4 for ; Wed, 09 Mar 2011 05:45:00 -0800 (PST) Message-ID: <4D778459.9020406@codemonkey.ws> Date: Wed, 09 Mar 2011 07:44:57 -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> In-Reply-To: <4D778094.8060803@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: Adam Litke , Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino On 03/09/2011 07:28 AM, Avi Kivity wrote: > On 03/07/2011 03:41 PM, Anthony Liguori wrote: >> On 03/07/2011 07:35 AM, Stefan Hajnoczi wrote: >>> On Mon, Mar 7, 2011 at 1:22 AM, Anthony >>> Liguori wrote: >>>> diff --git a/qmp-schema.json b/qmp-schema.json >>>> index e69de29..b343f5e 100644 >>>> --- a/qmp-schema.json >>>> +++ b/qmp-schema.json >>>> @@ -0,0 +1,38 @@ >>>> +# *-*- Mode: Python -*-* >>> By the way JSON does not seem to support comments (neither /* */ nor >>> #). So this comment feature you're using is an extension to JSON. >> >> 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. There's no way to do commenting in JSON and I really wanted to have inline documentation. But otherwise, it's valid JSON. Regards, Anthony Liguori