mirror of https://github.com/xemu-project/xemu.git
26 lines
463 B
JSON
26 lines
463 B
JSON
# flat unions require a base
|
|
# TODO: simple unions should be able to use an enum discriminator
|
|
|
|
##
|
|
# @TestTypeA:
|
|
##
|
|
{ 'struct': 'TestTypeA',
|
|
'data': { 'string': 'str' } }
|
|
##
|
|
# @TestTypeB:
|
|
##
|
|
{ 'struct': 'TestTypeB',
|
|
'data': { 'integer': 'int' } }
|
|
##
|
|
# @Enum:
|
|
##
|
|
{ 'enum': 'Enum',
|
|
'data': [ 'value1', 'value2' ] }
|
|
##
|
|
# @TestUnion:
|
|
##
|
|
{ 'union': 'TestUnion',
|
|
'discriminator': 'Enum',
|
|
'data': { 'value1': 'TestTypeA',
|
|
'value2': 'TestTypeB' } }
|