From: Paolo Bonzini <pbonzini@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] RFC: libyajl for JSON
Date: Tue, 3 Nov 2015 15:53:34 +0100 [thread overview]
Message-ID: <5638CA6E.1080003@redhat.com> (raw)
In-Reply-To: <20151103092659.126ab97c@redhat.com>
On 03/11/2015 15:26, Luiz Capitulino wrote:
> > 1) uglify all tests and make them inconsistent with the QAPI schemas,
> > which also uses single-quoted strings
>
> This doesn't seem hard to fix, we could pre-process the test files,
> say in Python, to add the needed escaping.
I'm talking about qtests:
qmp_discard_response("{'execute':'change', 'arguments':{"
" 'device':'floppy0', 'target': %s, 'arg': 'raw' }}",
versus
qmp_discard_response("{\"execute\":\"change\", \"arguments\":{"
" \"device\":\"floppy0\", \"target\": %s, \"arg\": \"raw\" }}",
> > 2) waste time finding a replacement for % interpolation (the best
> > replacement here would be to rewrite the tests in Python IMHO, but
> > that's not a small ask)
>
> Is this only used by tests? Can you give an example of this feature?
See above. Notice how the %s becomes a JSON string, with automatic
backslash escaping.
Paolo
next prev parent reply other threads:[~2015-11-03 14:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 19:45 [Qemu-devel] RFC: libyajl for JSON Eric Blake
2015-10-30 20:16 ` Peter Maydell
2015-11-02 8:40 ` Markus Armbruster
2015-11-02 11:49 ` Paolo Bonzini
2015-11-02 12:56 ` Markus Armbruster
2015-11-02 13:47 ` Paolo Bonzini
2015-11-02 14:10 ` Stefan Hajnoczi
2015-11-02 15:46 ` Eric Blake
2015-11-02 19:10 ` Markus Armbruster
2015-11-02 20:08 ` Eric Blake
2015-11-03 7:17 ` Markus Armbruster
2015-11-03 13:19 ` Luiz Capitulino
2015-11-03 13:38 ` Paolo Bonzini
2015-11-03 13:46 ` Luiz Capitulino
2015-11-03 13:53 ` Paolo Bonzini
2015-11-03 14:26 ` Luiz Capitulino
2015-11-03 14:53 ` Paolo Bonzini [this message]
2015-11-03 15:08 ` Markus Armbruster
2015-11-03 13:40 ` Eric Blake
2015-11-03 13:44 ` Daniel P. Berrange
2015-11-03 13:53 ` Luiz Capitulino
2015-11-02 13:17 ` 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=5638CA6E.1080003@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@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).