[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] RFC: libyajl for JSON
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] RFC: libyajl for JSON |
Date: |
Tue, 3 Nov 2015 15:53:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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
- Re: [Qemu-devel] RFC: libyajl for JSON, (continued)
- Re: [Qemu-devel] RFC: libyajl for JSON, Stefan Hajnoczi, 2015/11/02
- Re: [Qemu-devel] RFC: libyajl for JSON, Eric Blake, 2015/11/02
- Re: [Qemu-devel] RFC: libyajl for JSON, Markus Armbruster, 2015/11/02
- Re: [Qemu-devel] RFC: libyajl for JSON, Eric Blake, 2015/11/02
- Re: [Qemu-devel] RFC: libyajl for JSON, Markus Armbruster, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Luiz Capitulino, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Paolo Bonzini, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Luiz Capitulino, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Paolo Bonzini, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Luiz Capitulino, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON,
Paolo Bonzini <=
- Re: [Qemu-devel] RFC: libyajl for JSON, Markus Armbruster, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Eric Blake, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Daniel P. Berrange, 2015/11/03
- Re: [Qemu-devel] RFC: libyajl for JSON, Luiz Capitulino, 2015/11/03
Re: [Qemu-devel] RFC: libyajl for JSON, Luiz Capitulino, 2015/11/02