thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C Bergström <>
Subject Python client vs C# client json/binary different.. a lot of extra comma!! (confused)
Date Mon, 11 Mar 2019 09:32:11 GMT

I'm really super stuck and kindly ask for some help. I'm working on a
python based client, but seeing some correct or spurious extra comma and
wondering what on earth am I doing wrong.

For example

I swear my code is correct?!! (The C# version does work.. I tried reading
the source, but it looked fine and it does work at the end of the day.)

// I test with thrift compiler 12 and 13 git head
namespace py auth_args

struct Data {
    1: required i32 project_id
    2: required i64 uid
    3: required string auth_token
    4: required string version
    5: map<string,string> kv

exception RtmGatedException {
    1: i32 code
    2: string reason

service AuthArgs {
    bool auth(1:i32 project_id 2:i64 uid 3:string auth_token 4:string
version 5:map<string, string> kv)

Swapped to JSON protocol just so I could get something readable
Python New
// Many extra comma and the end has a lot of extra parentheses
load      =

C# example output just for testing

Binary portocol for anyone with a batman decoder ring (I couldn't get the
c++ debug tool to build :-/ )

I'm kinda concerned the magic bit is different.. How would I even change
this in Python?
Python New

C# old working

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message