On 22/02/21 16:24, Daniel P. Berrangé wrote:
This problem isn't unique to QEMU. Any app using JSON from the
shell will have the tedium of quote escaping. JSON is incredibly
widespread and no other apps felt it neccessary to introduce single
quoting support, because the benefit doesn't outweigh the interop
problem it introduces.

The quotes were introduced for C code (and especially qtest), not for the shell. We have something like

    response = qmp("{ 'execute': 'qom-get', 'arguments': { 'path': %s, "
                   "'property': 'temperature' } }", id);

These are sent to QEMU as double-quoted strings (the single-quoted JSON is parsed to get interpolation and printed back; commit 563890c7c7, "libqtest: escape strings in QMP commands, fix leak", 2014-07-01). However, doing the interpolation requires a parser that recognizes the single-quoted strings.

Markus, did you rebuild the qtests after disabling single-quoted strings? "make check-qtest-x86_64" would have rebuilt them, but I'm confused by the results.

Paolo

Reply via email to