qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: aliguori@linux.vnet.ibm.com, avi@redhat.com,
	qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] QMP's success response
Date: Thu, 17 Dec 2009 19:09:18 +0000	[thread overview]
Message-ID: <20091217190918.GB362@shareable.org> (raw)
In-Reply-To: <20091217154147.22845395@doriath>

Luiz Capitulino wrote:
> 
>  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": {} }

Logically, it would be { "return": null }.  What if future return
value is actually an empty dict? ;-)  E.g. from an enumeration command,
where the enumerated set is empty.

-- Jamie

  parent reply	other threads:[~2009-12-17 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 17:41 [Qemu-devel] QMP's success response Luiz Capitulino
2009-12-17 17:46 ` [Qemu-devel] " Daniel P. Berrange
2009-12-17 18:32 ` [Qemu-devel] " Markus Armbruster
2009-12-17 19:09 ` Jamie Lokier [this message]
2009-12-17 19:19   ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091217190918.GB362@shareable.org \
    --to=jamie@shareable.org \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).