You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2012/05/08 23:29:49 UTC

[jira] [Commented] (AVRO-1073) JSON binary encoding doesn't work

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

Doug Cutting commented on AVRO-1073:
------------------------------------

Can you please provide a test case that fails?  Thanks!
                
> JSON binary encoding doesn't work
> ---------------------------------
>
>                 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira