mirror_qemu/qobject
Kevin Wolf 69dd62dfd6 qapi: Anonymous unions
The discriminator for anonymous unions is the data type. This allows to
have a union type that allows both of these:

    { 'file': 'my_existing_block_device_id' }
    { 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } }

Unions like this are specified in the schema with an empty dict as
discriminator. For this example you could take:

    { 'union': 'BlockRef',
      'discriminator': {},
      'data': { 'definition': 'BlockOptions',
                'reference': 'str' } }
    { 'type': 'ExampleObject',
      'data: { 'file': 'BlockRef' } }

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2013-07-26 21:10:11 +02:00
..
Makefile.objs
json-lexer.c
json-parser.c json-parser: fix handling of large whole number values 2013-05-23 09:44:20 -04:00
json-streamer.c
qbool.c
qdict.c
qerror.c
qfloat.c
qint.c
qjson.c qapi: Anonymous unions 2013-07-26 21:10:11 +02:00
qlist.c
qstring.c qstring: add qstring_get_length() 2013-04-05 08:42:29 -04:00