On Mon, Feb 22, 2021 at 15:57:22 +0100, Markus Armbruster wrote: > We use JSON in several external interfaces: > > * QMP > > * The guest agent's QMP > > * QAPIfied command line options when the option argument starts with > '{' > > * The block layer's pseudo-protocol "json:" (which can get embedded in > image headers) > > I *think* that's all. > > The JSON parser we use for these interfaces supports extensions over RFC > 8259. Quoting json-lexer.c: > > - Extra escape sequence in strings: > 0x27 (apostrophe) is recognized after escape, too > > - Single-quoted strings: > Like double-quoted strings, except they're delimited by %x27 > (apostrophe) instead of %x22 (quotation mark), and can't contain > unescaped apostrophe, but can contain unescaped quotation mark. [...] > We could certainly tidy up the tests to stick to standard JSON. > However, the prevalence of single-quoted strings in iotests makes me > suspect that they are being used in the field as well. Deprecating the > extension is likely more trouble than it's worth. > > Opinions? Any user of QEMU through libvirt will not use any of the extensions even in cases such as QMP command pasthrough (virsh qemu-monitor-command) and the 'json:' pseudo-protocol, as libvirt parses the provided JSON to add sequencing for QMP passthrough, and for image chain detection in case of 'json:'. Since libvirt's JSON library (yajl) doesn't support any of those extensions users are forced to not use them. So on behalf of libvirt, we'd be fine with deprecation/removal of those.