From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLL9V-0004tj-5e for qemu-devel@nongnu.org; Thu, 17 Dec 2009 13:32:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLL9Q-0004iB-0O for qemu-devel@nongnu.org; Thu, 17 Dec 2009 13:32:40 -0500 Received: from [199.232.76.173] (port=44374 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLL9P-0004i2-RU for qemu-devel@nongnu.org; Thu, 17 Dec 2009 13:32:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25116) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLL9P-0004ZJ-L5 for qemu-devel@nongnu.org; Thu, 17 Dec 2009 13:32:35 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] QMP's success response References: <20091217154147.22845395@doriath> Date: Thu, 17 Dec 2009 19:32:30 +0100 In-Reply-To: <20091217154147.22845395@doriath> (Luiz Capitulino's message of "Thu, 17 Dec 2009 15:41:47 -0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@linux.vnet.ibm.com, qemu-devel@nongnu.org, avi@redhat.com Luiz Capitulino writes: > Hi there, > > Currently, when a regular command doesn't have any data to output, > QMP will emit: > > { "return": "OK" } > > I thought this was a good idea because it has a clear meaning. Silly me, > this is optimized for humans, but for machines it introduces the problem > that such commands can't be changed to return values. > > I'm not sure this is will ever happen, but to stay safe a better way > would be to return an empty dict, like this: > > { "return": {} } > > Which can be read as 'command succeeded, but didn't return any data'. > > As the release is not done yet we still can change it, is anyone against? I'm very much in favor of it.