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

Doug Cutting commented on AVRO-1275:
------------------------------------

Also note that the json_encoding mentioned in the description is not totally 
relevant here, since that tags union values and GenericData#toString() does not.

The more relevant part of the specification is the description of default 
values (http://avro.apache.org/docs/current/spec.html#schema_complex).  Union 
branches are not represented in default values (the first branch is always 
assumed).  So GenericData#toString() should match the format for default 
values, and does, except for this bug.
                
> GenericData's toString() method generates the wrong JSON encoding for the 
> bytes type
> ------------------------------------------------------------------------------------
>
>                 Key: AVRO-1275
>                 URL: https://issues.apache.org/jira/browse/AVRO-1275
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Tom White
>             Fix For: 1.8.0
>
>
> We discovered in AVRO-1274 that for bytes GenericData.toString(Object datum) 
> incorrectly generates 
> {noformat}
> { "bytes" : "A" }
> {noformat}
> rather than just {{"A"}} for the JSON encoding defined in the spec 
> (http://avro.apache.org/docs/current/spec.html#json_encoding).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to