{
"$namespace" : "http://www.example.com/my-schema",
"$types" : [
{
"$kind" : "union",
"$content" : [ "string", { "$kind" : "array", "$content" : [ "integer" ] } ],
"$name" : "string-or-integer-array"
},
{
"$kind" : "union",
"$content" : [ "string", { "$kind" : "array", "$content" : [ "integer" ] } ],
"$enumeration" : [ "foo", [ 1, 2, 3, 4 ] ],
"$name" : "just-two"
}
]
}
"foo", "bar" and [ 1, 2, 3 ] are valid against the Type named "Q{http://www.example.com/my-schema}string-or-integer-array" but 3.14 and true are not.
"foo", and [ 1, 2, 3, 4 ] are valid against the Type named "Q{http://www.example.com/my-schema}just-two" but [ 1 ] and "bar" are not.