You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "PookieBuns (via GitHub)" <gi...@apache.org> on 2026/02/02 18:52:47 UTC

Re: [I] RFC: Rust representations of Unions that contain a null variant [avro-rs]

PookieBuns commented on issue #449:
URL: https://github.com/apache/avro-rs/issues/449#issuecomment-3837038647

   Hi @Kriskras99, I just wanted to note that the `TryFrom<Value> for serde_json::Value` is currently incorrect as per avro-specification regarding unions, since it doesn't follow the json_encoding spec
   
   > The value of a union is encoded in JSON as follows:
   >
   > if its type is null, then it is encoded as a JSON null;
   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.
   
   I can create a PR to address this.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org