You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Christophe Lorenz (JIRA)" <ji...@apache.org> on 2014/09/10 12:44:29 UTC
[jira] [Updated] (AVRO-1073) JSON binary encoding doesn't output
base64
[ https://issues.apache.org/jira/browse/AVRO-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christophe Lorenz updated AVRO-1073:
------------------------------------
Summary: JSON binary encoding doesn't output base64 (was: JSON binary encoding doesn't work)
> JSON binary encoding doesn't output base64
> ------------------------------------------
>
> 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)