Hi,
I have the following schema with subtypes declared inside:
{
"namespace": "azen.avro.personGesamt",
"type": "record",
"name": "Person",
"fields": [
{"name": "id", "type": "int"},
{"name": "name", "type": "string"},
{"name": "email", "type": ["string", "null"]},
{"name": "phones", "type": ["null", {"type": "array", "items":
{
"type": "record",
"name": "PhoneNumber",
"fields": [
{"name": "number", "type": "string"},
{"name": "type", "type": {
"type": "enum",
"name": "PhoneType",
"symbols" : ["mobile", "home", "work"]
}
}
]
}
}]}
]
}
Now I want to use it inside a Java Class using the parsed schema.
This works well for the first few elements. But I do not know how
to create the objects for PhoneNumber and PhoneType. Any hints?
--
regards
alex