Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1582

Json serialization of nullable fields and fields with default values improvement.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • java
    • None

    Description

      Currently serializing a nullable field of type union like:
      "type" : ["null","some type"]

      when serialized as JSON results in:

      "field":

      {"some type":"value"}

      when it could be:

      "field":"value"

      Also fields that equal the the default value can be omitted from the serialized data. This is possible because the reader will have the writer's schema and can infer the field values. This reduces the size of the json messages.

      Attachments

        1. AVRO-1582-PATCH
          2 kB
          Zoltan Farkas

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zolyfarkas Zoltan Farkas
              Votes:
              25 Vote for this issue
              Watchers:
              37 Start watching this issue

              Dates

                Created:
                Updated: