avro-0.3.0.1: test/data/unions.avsc
{ "type" : "record",
"name" : "Unions",
"namespace" : "haskell.avro.example",
"fields" : [
{ "name" : "scalars",
"type" : ["string", "long"],
"default" : "foo"
},
{ "name" : "nullable",
"type" : ["null", "int"],
"default" : null
},
{ "name" : "records",
"type" : [
{ "type" : "record",
"name" : "Foo",
"fields" : [
{ "name" : "stuff",
"type" : "string"
}
]
},
{ "type" : "record",
"name" : "Bar",
"fields" : [
{ "name" : "stuff",
"type" : "string"
},
{ "name" : "things",
"type" : "Foo"
}
]
}
]
},
{ "name" : "sameFields",
"type" : [
"Foo",
{ "type" : "record",
"name" : "NotFoo",
"fields" : [
{ "name" : "stuff", "type" : "string" }
]
}
]
}
]
}