Hello,

My system is receiving JSON data serialized from JSON schemas. I am trying
to represent the *minProperties *and *maxProperties *types in JSON schema
in AVRO using Union types. But the problem is, AVRO JSON decoder expect the
Union branch to be present in data and it searches the union type by fully
qualified name i.e. namespace and type name.

Unfortunately, this is not how my data is encoded.

My input JSON is encoded like this:

{"Request": {
....
  }
}

And I represent it as:

{
    "name": "Schemas",
    "namespace": "com.sample",
    "type": ["null", {
        "type": "record"
        "name": "Request"
        ...

    }
}

So AVRO JSON decoder expects the following:

{"com.sample.Request": {
....
  }
}

One way I thought I could solve this is by using blank namespaces. But
that messes my Java class generation in default package.


Any way around this? Any help is appreciated.

Thank you.

Reply via email to