[
https://issues.apache.org/jira/browse/THRIFT-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14731935#comment-14731935
]
Hudson commented on THRIFT-3302:
--------------------------------
SUCCESS: Integrated in Thrift #1651 (See
[https://builds.apache.org/job/Thrift/1651/])
THRIFT-3302 Go JSON protocol should encode Thrift byte type as signed integer
string (jensg: rev 5bc8b5a3a5da507b6f87436ca629be664496a69f)
* lib/go/thrift/json_protocol.go
* lib/go/thrift/simple_json_protocol.go
* lib/go/thrift/debug_protocol.go
* lib/go/thrift/serializer_types_test.go
* lib/go/thrift/simple_json_protocol_test.go
* lib/go/thrift/protocol_test.go
* lib/go/thrift/protocol.go
* lib/go/thrift/binary_protocol.go
* lib/go/thrift/json_protocol_test.go
* lib/go/test/tests/protocol_mock.go
* test/known_failures_Linux.json
* lib/go/thrift/compact_protocol.go
* compiler/cpp/src/generate/t_go_generator.cc
> Go JSON protocol should encode Thrift byte type as signed integer string
> ------------------------------------------------------------------------
>
> Key: THRIFT-3302
> URL: https://issues.apache.org/jira/browse/THRIFT-3302
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library
> Reporter: Nobuaki Sukegawa
> Assignee: Nobuaki Sukegawa
> Fix For: 0.9.3
>
>
> h3. Problem
> Go implementation of JSON and simple JSON protocols encode Thrift byte type
> field as unsigned 8bit integer.
> i.e. -1 is encoded to "255" by Go implementation while "-1" by others like
> C++, Java and Python.
> h3. Reproduce
> Cross test with go server and py client (JSON protocols of course).
> (like "expected -127 but got 129")
> Static-typed clients (such as C++ and Java) are not likely to notice the
> difference because of integer overflow.
> h3. Fix
> Explicitly convert the unsigned 8-bit value back to signed one in JSON
> protocols before converting to text.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)