avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Steiblys (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1582) Json serialization of nullable fileds and fields with default values improvement.
Date Wed, 12 Aug 2015 18:28:46 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693977#comment-14693977
] 

Lukas Steiblys commented on AVRO-1582:
--------------------------------------

BTW, thank you [~zolyfarkas]. I was planning on implementing this myself so you saved us a
lot of time.

> Json serialization of nullable fileds and fields with default values improvement.
> ---------------------------------------------------------------------------------
>
>                 Key: AVRO-1582
>                 URL: https://issues.apache.org/jira/browse/AVRO-1582
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.8.0
>            Reporter: Zoltan Farkas
>            Priority: Minor
>         Attachments: AVRO-1582-PATCH
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message