mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Sallou <>
Subject Re: protbuf to json not compatible
Date Fri, 24 Mar 2017 07:44:22 GMT

On 03/24/2017 04:02 AM, James Peach wrote:
>> On Mar 23, 2017, at 7:58 PM, James Peach <> wrote:
>>> On Mar 23, 2017, at 1:54 AM, Olivier Sallou <> wrote:
>>> Hi,
>>> when transforming a protobug message to json with MessageToJson, the
>>> json is not compatible with the json format expected by Mesos master.
>> This is because you generated the protobuf bindings with proto3 compiler. AFAICT
they made an incompatible change to the JSON wire format. This bites you when using the jsonpb
Go package, for example. I ended up post-processing the generated Go code to correct the field
> Sorry I forgot to mention that the other workaround is to generate the protobuf bindings
with the proto2 compiler.
My first workaround is to generate json directly, not a big deal in my
case, but I wanted to understand.

> J

Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE

gpg key id: 4096R/326D8438  (
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438

View raw message