[
https://issues.apache.org/jira/browse/THRIFT-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer updated THRIFT-2011:
-------------------------------
Description:
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.
was:
The Go implementation of the JSON protocol inherits from SimpleJSON protocol.
Example to reproduce: Given a list<string>, 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 inherited method OutputElemListBegin(), which writes the
field type as a byte value, without passing it through TypeIdToString().
> Go JSON writes incorrect data
> -----------------------------
>
> 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
>
> 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.
--
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