You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Tyler Prete (JIRA)" <ji...@apache.org> on 2013/11/19 20:55:20 UTC
[jira] [Comment Edited] (THRIFT-2217) TSimpleJSONProtocol and
TJSONProtocol exports boolean as 1/0
[ https://issues.apache.org/jira/browse/THRIFT-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826868#comment-13826868 ]
Tyler Prete edited comment on THRIFT-2217 at 11/19/13 7:54 PM:
---------------------------------------------------------------
Going along with Jens comment, I've created a patch to change this for TSimpleJSONProtocol. At my company we're actually subclassing TSimpleJSONProtocol to get around this, so it would be nice to have in master.
was (Author: tsprete):
Output booleans as json booleans in TSimpleJSONProtocol.
> TSimpleJSONProtocol and TJSONProtocol exports boolean as 1/0
> ------------------------------------------------------------
>
> Key: THRIFT-2217
> URL: https://issues.apache.org/jira/browse/THRIFT-2217
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library, Java - Library, Python - Library
> Affects Versions: 0.9
> Reporter: Andrew Selder
> Attachments: thrift-2217-tsimple-json-output-booleans.patch
>
>
> Both the TSimpleJSONProtocol and TJSONProtocols export bool values with a 1 for true and a 0 for false.
> JSON defines true and false literals which would be a much more appropriate representation of the actual state of the object.
> Consumers of the exported JSON end up with integer values instead of booleans.
--
This message was sent by Atlassian JIRA
(v6.1#6144)