Open ridomin opened 2 months ago
Hey @ridomin,
That's right, the output JSON is compatible with .NET model, not with Avro Json spec. Could you provide more details on your use case?
Best, Adrian
Avro has very specific rules to declare which fields are required vs. optional, using union with null
, and those rules are different from the .NET serialization model.
My use case is to validate the messages based on Avro schemas, including which fields are required. Without it I cannot apply the Avro schema to validate.
Would that be helpful if there were an API exposing the schema model?
If that schema captures which fields are optional, yes it will be helpful.
Convert Avro to Json does not follow the Avro Json Encoding spec
When using union types to define optional parameters, by adding
null
to the type union, the produced Json does not follow the spechttps://avro.apache.org/docs/1.11.1/specification/#json-encoding
When using a record field with a type like
And converting the avro bytes to Json
The expected output should be
instead I got