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

vinisha commented on AVRO-1950:
-------------------------------

+1

I think same applies for other logical types such as Date, Timestamp etc. It 
would be good to have string conversions of those available by default for 
representing them in json.

> Better Json serialization for Avro decimal logical types?
> ---------------------------------------------------------
>
>                 Key: AVRO-1950
>                 URL: https://issues.apache.org/jira/browse/AVRO-1950
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>            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
(v8.3.4#803005)

Reply via email to