avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Maarek (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AVRO-1950) Better Json serialization for Avro decimal logical types?
Date Wed, 10 May 2017 05:15:05 GMT

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

Stephane Maarek edited comment on AVRO-1950 at 5/10/17 5:14 AM:
----------------------------------------------------------------

has there been any progress on this? bytes are highly uncommon and not json friendly, they
make serialization and deserialization as avro near impossible. Most of 3rd party libraries
will never get past the bytes[] and try a blend .toString on them. 


was (Author: stephane.maarek@gmail.com):
has there been any progress on this? bytes are highly uncommon and not json friendly, they
make serialization and deserialization as avro near impossible

> Better Json serialization for Avro decimal logical types?
> ---------------------------------------------------------
>
>                 Key: AVRO-1950
>                 URL: https://issues.apache.org/jira/browse/AVRO-1950
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Zoltan Farkas
>            Priority: Minor
>
> Currently as I understand decimal logical types are encoded on top of bytes and fixed
avro types. This makes them a bit "unnatural" in the json encoding...
> I worked around a hack in my fork to naturally encode them into json decimals. A good
starting point to look at is in: https://github.com/zolyfarkas/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/io/DecimalEncoder.java

> My approach is a bit hacky, so I would be interested in suggestions to have this closer
to something we can integrate into avro...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message