Closed adamlindqvist closed 7 months ago
Hi @adamlindqvist. Thanks for reporting - the optional shorthand isn't currently supported (PR very welcome!).
You'll need to stick to the long form until it is:
protocol Protocol {
record Record {
union { null, string } text;
}
}
@mtth Since the corresponding PR is now merged, any chance to release a new version to NPM to make this feature accessible?
I'm trying to parse a avdl file with an optional field but it seems that
avsc
does not support using the?
-syntax to describe a optional/nullable field.Example
.avdl file
Code:
Resulting in error:
Is this a known issue or is it possible to work around this?
Context: https://avro.apache.org/docs/1.11.1/idl-language/#unions