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

Jens Geyer edited comment on THRIFT-2011 at 6/12/13 8:14 PM:
-------------------------------------------------------------

[~traviscline]
-Here's the JSON fix, plus another fix for a minor problem with the Go 
generator. It's based on the THRIFT-2012 v3 patch.-

I add the patch to 2012. Makes more sense.
                
      was (Author: jensg):
    [~traviscline]
Here's the JSON fix, plus another fix for a minor problem with the Go 
generator. It's based on the THRIFT-2012 v3 patch.
                  
> Go JSON reads/writes incorrect data for list<>
> ----------------------------------------------
>
>                 Key: THRIFT-2011
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2011
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Library
>            Reporter: Jens Geyer
>              Labels: bug, json
>         Attachments: 0002-THRIFT-2012-Go-JSON-writes-incorrect-data-v3.patch
>
>
> Example to reproduce: Given a list<string> holding one "element", the 
> following JSON data are rendered:
> {quote}
> "lst":[{color:red}11{color},1,"element"]
> {quote}
> The expected sequence would be:
> {quote}
> "lst":[{color:green}"str"{color},1,"element"]
> {quote}
> This is due to the method OutputElemListBegin(), which JSON inherits from 
> SimpleJSON. This method writes the field type as a byte value, without 
> passing it through TypeIdToString(), which is incorrect for JSON.
> ----
> EDIT: Similar problem appears when a "lst" should be read.

--
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