[ 
https://issues.apache.org/jira/browse/AVRO-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christophe Lorenz updated AVRO-1073:
------------------------------------
    Summary: JSON encoder doesn't encode binary data properly  (was: JSON byte 
array encoding doesn't output base64)

> JSON encoder doesn't encode binary data properly
> ------------------------------------------------
>
>                 Key: AVRO-1073
>                 URL: https://issues.apache.org/jira/browse/AVRO-1073
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.6.3
>         Environment: uname -a
> Darwin zmac 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 
> 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
> java -version
> java version "1.6.0_29"
> Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
> Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
>            Reporter: Zhihong Zhang
>
> The JSON encoder doesn't encode binary data (bytes or ByteBuffer) properly. 
> It treats the data as Latin-1 and encode it as text. But there is a bug in 
> text encoding of non-Roman characters so the binary encoding doesn't work at 
> all.
> The binary should be encoded into ASCII (Base64 or 85) before it's encoded in 
> JSON. The text encoding of binary data is very inefficient even it works. For 
> example, the 0 is encoded as "\\u0000" in JSON (7 bytes).



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

Reply via email to