[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A brief look at deprecating our JSON extensions over RFC 8259
From: |
Peter Krempa |
Subject: |
Re: A brief look at deprecating our JSON extensions over RFC 8259 |
Date: |
Mon, 22 Feb 2021 16:10:31 +0100 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
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.
- A brief look at deprecating our JSON extensions over RFC 8259, Markus Armbruster, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259,
Peter Krempa <=
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Daniel P . Berrangé, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Liviu Ionescu, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Paolo Bonzini, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Daniel P . Berrangé, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Paolo Bonzini, 2021/02/22
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Markus Armbruster, 2021/02/23
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Markus Armbruster, 2021/02/23
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Peter Maydell, 2021/02/23
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Markus Armbruster, 2021/02/23
- Re: A brief look at deprecating our JSON extensions over RFC 8259, Markus Armbruster, 2021/02/23