I think the problem is: you created a union of records, but the Avro
doesn't know if it is a hello1 record instance, or a hello2 record
instance. In this case the you should encode the data like this:
{"hello1":{"foo": 5}}
{"hello2":{"bar": 10}}
Here <https://avro.apache.org/docs/1.8.1/spec.html#json_encoding> is the
relevant part of the specification.


On Tue, Jan 9, 2018 at 12:06 PM, kant kodali <[EMAIL PROTECTED]> wrote: