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

Doug Cutting commented on AVRO-1582:
------------------------------------

This seems generally useful, to simplify interoperability with json-based 
applications.

A few notes:
 - "Extended" doesn't seem like a good name prefix for this.  Perhaps it should 
be "StandardJson" or somesuch.  Perhaps it all belongs in a separate package, 
org.apache.avro.io.json?
 - For forward & backward compatibility reasons, encodings are hard to change.  
And each new encoding we add multiplies interoperability issues between Avro 
implementations.  So, if we add a new encoding, we should make sure to design 
it carefully.  For example, should this also include a more standard format for 
binary values, e.g., base64?
 - Discarding default values causes them to get whatever the default value is 
in the reading schema.  So if the schema's default changes between the time 
that a datum is written and re-read then the value in the datum will change 
when it's read.  Is that a bug or a feature?  Regardless, it needs to be 
well-documented.
 - More generally, documentation of the new serialization format is required, 
sufficient for someone to implement it independently.  Good javadoc is 
definitely required, and probably a new section in the Avro specification.

> Json serialization of nullable fileds 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"



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

Reply via email to