Skip to content

Nullable schema incorrect serialization #3

@shaeqahmed

Description

@shaeqahmed

According to the avro spec, nullable fields in a schema should have the following shape:

{
                "name" : "access_key_id",
                "type" : [ "null", "string" ],
                "default" : null

When serializing an AvroField, in this library, the default value is serialized as the string literal "null" rather than the null JSON value. Looking through the code, this is caused by reusing the Schema type for this option, although the convention are a little different in reality (e.g. for types, null is written as a string). Currently this breaks compatibility when using this library with other Avro tools to read and write files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions