rayokota commented on PR #1833: URL: https://github.com/apache/avro/pull/1833#issuecomment-1225083274
> How about a union with a member that is a record with a namespace? The [JSON Encoding](https://avro.apache.org/docs/1.11.1/specification/#json-encoding) specification says > > > otherwise it is encoded as a JSON object with one name/value pair whose name is the type’s name and whose value is the recursively encoded value. For Avro’s named types (record, fixed or enum) the user-specified name is used, for other types the type name is used. > > which refers to the record _name_ rather than _fullname_. @KalleOlaviNiemitalo , I added a test for a union containing a record with a namespace as you requested. The Java code uses the fullname for the union label [here](https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ValidatingGrammarGenerator.java#L104). Since the C# code is a straight port of the Java code, it uses the fullname for the union label [here](https://github.com/apache/avro/blob/1133acda686fb1ff96fcbb80ca606c20e261f343/lang/csharp/src/apache/main/IO/Parsing/ValidatingGrammarGenerator.cs#L111) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
