In my experience, records are the only custom schemas you can reference
by name, so:
{
"name": "metadata",
"type": {
"type": "record",
"fields": [
{ "name": "content",
"type": {
"type": map",
"values": [
"null",
"int",
"float",
"string",
"boolean",
"long",
"metadata"
]
}
}
]
}
}
This will give you a "true" recursive type (arbitrary nesting level),
which may or may not be what you want.
Regards,
Arne Vogel
On 27.03.2017 17:44, Dag Stockstad wrote:
Thank you so much for this. This works perfectly. I tried simply
putting the string "map" as one of the values but that obviously
didn't work. I think this would be worth calling out in documentation.
Happy to submit PR. Is that possible?
Thanks again. This really helped me.
Kind regards,
Dag