[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 02/36] qapi: Document type-safety considerati
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 02/36] qapi: Document type-safety considerations |
Date: |
Tue, 28 Apr 2015 13:42:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/04/2015 10:07 PM, Eric Blake wrote:
> Go into more details about the various types of valid expressions
> in a qapi schema, including tweaks to document fixes being done
> later in the current patch series. Also fix some stale and missing
> documentation in the QMP specification.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
Another self-review:
> +generated C structs and parameter lists). Ordering doesn't matter
> +between top-level expressions or the keys within an expression, but
> +does matter within dictionary values for 'data' and 'returns' members
> +of a single expression. QAPI schema input is written using 'single
> +quotes' instead of JSON's "double quotes" (in contrast, QMP usage is
> +strict JSON and only uses "double quotes", with no comments). As in
> +JSON, trailing commas are not permitted in arrays or dictionaries.
> +Input must be ASCII (although QMP supports full Unicode strings, the
> +QAPI parser does not). At present, there is no place where a QAPI
> +schema requires the use of JSON numbers or null.
Here I claim that QMP is "" only...
> +++ b/docs/qmp/qmp-spec.txt
> +
> +Also for convenience, the server will accept an extension of
> +'single-quoted' strings in place of the usual "double-quoted"
> +json-string, and both input forms of strings understand an additional
> +escape sequence of "\'" for a single quote. The server will only use
> +double quoting on output.
...which is at odds with reality.
Will fix in either a followup or a v7 respin
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v6 07/36] qapi: Better error messages for bad enums, (continued)
- [Qemu-devel] [PATCH v6 07/36] qapi: Better error messages for bad enums, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 09/36] qapi: Clean up test coverage of simple unions, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 06/36] qapi: Add some enum tests, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 10/36] qapi: Forbid base without discriminator in unions, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 02/36] qapi: Document type-safety considerations, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 15/36] qapi: Document new 'alternate' meta-type, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 13/36] qapi: Segregate anonymous unions into alternates in generator, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 14/36] qapi: Rename anonymous union type in test, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 11/36] qapi: Tighten checking of unions, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 21/36] qapi: Allow true, false and null in schema json, Eric Blake, 2015/04/05
- [Qemu-devel] [PATCH v6 17/36] qapi: Add some expr tests, Eric Blake, 2015/04/05