Projet_SETI_RISC-V/riscv-gnu-toolchain/qemu/tests/qapi-schema/union-optional-discriminator.json

11 lines
329 B
JSON
Raw Permalink Normal View History

2023-03-06 14:48:14 +01:00
# we require the discriminator to be non-optional
{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
{ 'struct': 'Base',
'data': { '*switch': 'Enum' } }
{ 'struct': 'Branch', 'data': { 'name': 'str' } }
{ 'union': 'MyUnion',
'base': 'Base',
'discriminator': 'switch',
'data': { 'one': 'Branch',
'two': 'Branch' } }