> On Mar 24, 2017, at 12:49 PM, Benjamin Mahler <bmah...@apache.org> wrote:
> 
> James, I'm curious, do you know specifically what the incompatibility is?

https://developers.google.com/protocol-buffers/docs/proto3#json

"Message field names are mapped to lowerCamelCase and become JSON object keys. "

So field names like "failover_timeout" are renamed to "failoverTimeout".

> 
> Olivier, if you're dealing with protobuf already and trying to send it to
> mesos, there's no need to use JSON. Unless you have a requirement to do so?
> There are some outstanding issues with our JSON<->Protobuf conversion,
> specifically we currently are inconsistent from proto3 when it comes to the
> int(32|64), fixed(32|64), uint(32|64) handling, for one (we don't allow
> strings on the input side (tomek is addressing that), and we don't use
> strings on the output side).
> 
> On Fri, Mar 24, 2017 at 12:44 AM, Olivier Sallou <olivier.sal...@irisa.fr>
> wrote:
> 
>> 
>> 
>> On 03/24/2017 04:02 AM, James Peach wrote:
>>>> On Mar 23, 2017, at 7:58 PM, James Peach <jor...@gmail.com> wrote:
>>>> 
>>>>> On Mar 23, 2017, at 1:54 AM, Olivier Sallou <olivier.sal...@irisa.fr>
>> 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 names.
>>> Sorry I forgot to mention that the other workaround is to generate the
>> protobuf bindings with the proto2 compiler.
>> Thanks
>> My first workaround is to generate json directly, not a big deal in my
>> case, but I wanted to understand.
>> 
>> Olivier
>>> 
>>> J
>> 
>> --
>> Olivier Sallou
>> IRISA / University of Rennes 1
>> Campus de Beaulieu, 35000 RENNES - FRANCE
>> Tel: 02.99.84.71.95
>> 
>> gpg key id: 4096R/326D8438  (keyring.debian.org)
>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>> 
>> 

Reply via email to