flow2schema/tests/samples/unions.json

47 lines
1.3 KiB
JSON
Raw Normal View History

2017-11-05 02:40:46 +03:00
{
2017-11-28 16:35:28 +03:00
"types": [
2017-11-05 02:40:46 +03:00
{
2017-11-28 16:35:28 +03:00
"id": ["unions", "Type"],
"kind": "record",
2017-11-05 02:40:46 +03:00
"fields": [
{
"name": "a",
2017-11-28 16:35:28 +03:00
"value": {
"kind": "union",
"variants": [{"kind": "string"}, {"kind": "boolean"}]
},
"required": true
2017-11-05 02:40:46 +03:00
}
]
},
{
2017-11-28 16:35:28 +03:00
"id": ["unions", "Interface"],
"kind": "record",
2017-11-05 02:40:46 +03:00
"fields": [
{
"name": "a",
2017-11-28 16:35:28 +03:00
"value": {
"kind": "union",
"variants": [{"kind": "string"}, {"kind": "boolean"}, {"kind": "number", "repr": "f64"}]
},
"required": true
2017-11-05 02:40:46 +03:00
}
]
},
{
2017-11-28 16:35:28 +03:00
"id": ["unions", "Class"],
"kind": "record",
2017-11-05 02:40:46 +03:00
"fields": [
{
"name": "a",
2017-11-28 16:35:28 +03:00
"value": {
"kind": "union",
"variants": [{"kind": "string"}, {"kind": "boolean"}]
},
"required": true
2017-11-05 02:40:46 +03:00
}
]
}
2017-11-21 16:32:29 +03:00
]
2017-11-05 02:40:46 +03:00
}