From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 5/7] add json encoder for qobjects
Date: Sat, 17 Oct 2009 11:20:39 -0500 [thread overview]
Message-ID: <4AD9EED7.7090103@codemonkey.ws> (raw)
In-Reply-To: <4AD9CA39.8060307@redhat.com>
Paolo Bonzini wrote:
> On 10/17/2009 03:03 PM, Anthony Liguori wrote:
>>
>> I think it makes more sense as an external entity.
>
> Maybe... I just thought of it as a toString method that happens to
> emit JSON.
json is one representation of the monitor protocol. I think we should
attempt to design things so that there is a clear separate of
representation from the implementation.
BTW, the next thing I'd like to do this weekend is write a QObject
decoded based on the json parser. So that you can do something like:
int locked, readonly;
char *file;
err = qobject_unmarshal(obj, "{'locked': %i, 'file': %s, 'readonly':
%i}", &locked, &file, &readonly);
I think this would tremendously simplify the monitor command
implementations.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-10-17 16:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-17 7:55 [Qemu-devel] [PATCH 0/7] Add JSON enconding and formatted printing to QObject Paolo Bonzini
2009-10-17 7:55 ` [Qemu-devel] [PATCH 1/7] add qemu_memdup Paolo Bonzini
2009-10-17 7:55 ` [Qemu-devel] [PATCH 2/7] allow passing NULL to qobject_type Paolo Bonzini
2009-10-17 7:55 ` [Qemu-devel] [PATCH 3/7] forward declare all QObject subclasses in qobject.h Paolo Bonzini
2009-10-17 13:02 ` Anthony Liguori
2009-10-17 7:55 ` [Qemu-devel] [PATCH 4/7] add mutable qstring functions Paolo Bonzini
2009-10-17 13:03 ` Anthony Liguori
2009-10-17 7:55 ` [Qemu-devel] [PATCH 5/7] add json encoder for qobjects Paolo Bonzini
2009-10-17 13:03 ` Anthony Liguori
2009-10-17 13:44 ` Paolo Bonzini
2009-10-17 16:20 ` Anthony Liguori [this message]
2009-10-17 7:55 ` [Qemu-devel] [PATCH 6/7] add testsuite for qobject json encoder Paolo Bonzini
2009-10-17 7:55 ` [Qemu-devel] [PATCH 7/7] add formatted printing of QObjects Paolo Bonzini
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=4AD9EED7.7090103@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.