Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D73A8200C41 for ; Fri, 24 Mar 2017 08:44:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D5C41160B93; Fri, 24 Mar 2017 07:44:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2A9AD160B82 for ; Fri, 24 Mar 2017 08:44:05 +0100 (CET) Received: (qmail 83101 invoked by uid 500); 24 Mar 2017 07:44:04 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 83088 invoked by uid 99); 24 Mar 2017 07:44:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2017 07:44:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7FAC0CE9D1 for ; Fri, 24 Mar 2017 07:44:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.999 X-Spam-Level: X-Spam-Status: No, score=-3.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xMw0y1lIC6Jw for ; Fri, 24 Mar 2017 07:44:01 +0000 (UTC) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7D0E35FAD1 for ; Fri, 24 Mar 2017 07:44:01 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.36,213,1486422000"; d="scan'208";a="265992145" Received: from tifenn.irisa.fr (HELO [131.254.17.40]) ([131.254.17.40]) by mail2-relais-roc.national.inria.fr with ESMTP; 24 Mar 2017 08:44:01 +0100 Subject: Re: protbuf to json not compatible To: dev@mesos.apache.org References: <2dad2e07-6bc3-3991-7ee8-1ab0febec2dd@irisa.fr> <81B944C8-BC6F-425E-8D40-32FC23CBC270@gmail.com> From: Olivier Sallou Message-ID: <32901f6f-e691-7a4c-f1d1-41bb6b9c467b@irisa.fr> Date: Fri, 24 Mar 2017 08:44:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <81B944C8-BC6F-425E-8D40-32FC23CBC270@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit archived-at: Fri, 24 Mar 2017 07:44:06 -0000 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 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