I have this avro schema in which I have capture declared as boolean and I wanted to give default value as true
.
{
"namespace": "abc",
"type": "record",
"name": "Request",
"fields": [
{
"name": "amount",
"type": "long",
},
{
"name": "currency",
"type": ["string", "null"],
},
{
"name": "capture",
"type": "boolean",
"default": true
}
}
When this is used in Java, it gets default value null
.
What do I need to do to default it to true
?