You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Kalle Niemitalo (Jira)" <ji...@apache.org> on 2022/08/24 08:22:00 UTC

[jira] [Created] (AVRO-3620) name vs. fullname in JSON encoding of union

Kalle Niemitalo created AVRO-3620:
-------------------------------------

             Summary: name vs. fullname in JSON encoding of union
                 Key: AVRO-3620
                 URL: https://issues.apache.org/jira/browse/AVRO-3620
             Project: Apache Avro
          Issue Type: Bug
          Components: spec
    Affects Versions: 1.11.1
            Reporter: Kalle Niemitalo


The [JSON Encoding|https://avro.apache.org/docs/1.11.1/specification/#json-encoding] section of the Avro specification states that a union with a non-null value _"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."_ This refers to the {_}name{_}, but at least the JSON encoder for Java writes the _fullname_ of the type instead. The terms "name" and "fullname" are defined in [Names|https://avro.apache.org/docs/1.11.1/specification/#names].

Tasks in this issue:
 - Collect information about each implementation: whether its JSON encoder writes the name or the fullname, and whether its JSON decoder accepts the name, fullname, or both.
 - Decide whether the name or the fullname should be used.
 - Change the specification and implementations according to the decision, or file separate issues for individual implementations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)