Re: Re : Re: protbuf to json not compatible

2017-03-27 Thread Benjamin Mahler
As a note, if you just need the protobufs you should be able to run protoc against the published protos for the version you're building against without needing to pull in the 'mesos.native' package. The 'mesos.native' package provides scheduler and executor implementations (via talking to the C++ m

Re : Re: protbuf to json not compatible

2017-03-25 Thread Olivier Sallou
- Benjamin Mahler a écrit : > James, I'm curious, do you know specifically what the incompatibility is? > > 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? I can manage json, this is fine

Re: protbuf to json not compatible

2017-03-24 Thread James Peach
> On Mar 24, 2017, at 12:49 PM, Benjamin Mahler 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

Re: protbuf to json not compatible

2017-03-24 Thread Benjamin Mahler
Tomek I think that patch also needs to address accepting strings for floating point fields: float, double. IMO, to avoid confusion, we want to get as close as possible to the proto3 specified mapping, which allows string inputs for all types of numeric fields: https://developers.google.com/protoco

Re: protbuf to json not compatible

2017-03-24 Thread Benjamin Mahler
James, I'm curious, do you know specifically what the incompatibility is? 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, spe

Re: protbuf to json not compatible

2017-03-24 Thread Anand Mazumdar
Hi Tomek, Looks like we dropped the ball on MESOS-5995 (https://issues.apache.org/jira/browse/MESOS-5995). I assigned myself as the shepherd and would take a look next week. -anand On Thu, Mar 23, 2017 at 2:09 AM, Tomek Janiszewski wrote: > I have a similar problem with protobuf and json. In my

Re: protbuf to json not compatible

2017-03-24 Thread Olivier Sallou
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 expect

Re: protbuf to json not compatible

2017-03-23 Thread James Peach
> 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

Re: protbuf to json not compatible

2017-03-23 Thread James Peach
> 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 m

Re: protbuf to json not compatible

2017-03-23 Thread Benjamin Mahler
+anand, vinod On Thu, Mar 23, 2017 at 2:09 AM, Tomek Janiszewski wrote: > I have a similar problem with protobuf and json. In my case numbers were > incorrectly unmarshaled. Here is an issue > https://issues.apache.org/jira/browse/MESOS-970 and review > https://reviews.apache.org/r/50851/ > > cz

Re: protbuf to json not compatible

2017-03-23 Thread Benjamin Mahler
+gilbert On Thu, 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. > > For example, for volumes it generates > > > volumes: [ > > {'hostPath': '

Re: protbuf to json not compatible

2017-03-23 Thread Tomek Janiszewski
I have a similar problem with protobuf and json. In my case numbers were incorrectly unmarshaled. Here is an issue https://issues.apache.org/jira/browse/MESOS-970 and review https://reviews.apache.org/r/50851/ czw., 23.03.2017, 09:54 użytkownik Olivier Sallou napisał: > Hi, > > when transforming

protbuf to json not compatible

2017-03-23 Thread Olivier Sallou
Hi, when transforming a protobug message to json with MessageToJson, the json is not compatible with the json format expected by Mesos master. For example, for volumes it generates volumes: [ {'hostPath': '', 'containerPath': '...', ... } ] but HTTP API expects "sou