Hi, thanks for responding. I know that you promote your fork, however considering I might not be able to move away from "official release", is there an easy way how to consume this? Since I cannot see it ...
Maybe side question: official avro seems to be dead. There are some commits made, but last release happened 2 years ago, fatal flaws are not being addressed, almost 10 years old valid bug reports are just ignored, ... Does anyone know about any sign/confirmation that avro community will be moving toward something more viable? M. po 15. 4. 2019 v 15:17 odesílatel Zoltan Farkas <zolyfar...@yahoo.com> napsal: > It is possible to do it with a custom JsonDecoder. > > I wrote one that does this at: > https://github.com/zolyfarkas/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/io/ExtendedJsonDecoder.java > > > hope it helps. > > > —Z > > On Apr 13, 2019, at 9:24 AM, Martin Mucha <alfon...@gmail.com> wrote: > > Hi, > > is it possible by design to deserialize JSON with schema having optional > value? > Schema: > > { > "type" : "record", > "name" : "UserSessionEvent", > "namespace" : "events", > "fields" : [ { > "name" : "username", > "type" : "string" > }, { > "name" : "errorData", > "type" : [ "null", "string" ], > "default" : null > }]} > > Value to deserialize: > > {"username" : "2271AE67-34DE-4B43-8839-07216C5D10E1"} > > I also tried to change order of type, but that changed nothing. I know I > can produce ill-formated JSON which could be deserialized, but that's not > acceptable. AFAIK given JSON with required `username` and optional > `errorData` cannot be deserialized by design. Am I right? > > thanks. > > >