From reviews-return-74580-archive-asf-public=cust-asf.ponee.io@mesos.apache.org Tue Mar 13 07:47:33 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 852CE18064F for ; Tue, 13 Mar 2018 07:47:32 +0100 (CET) Received: (qmail 29757 invoked by uid 500); 13 Mar 2018 06:47:31 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 29745 invoked by uid 99); 13 Mar 2018 06:47:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2018 06:47:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 512531806F3; Tue, 13 Mar 2018 06:47:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.39 X-Spam-Level: ** X-Spam-Status: No, score=2.39 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id W8WJkUFEXv74; Tue, 13 Mar 2018 06:47:29 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id ED7725F238; Tue, 13 Mar 2018 06:47:28 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6F795E0114; Tue, 13 Mar 2018 06:47:28 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 0A711C40389; Tue, 13 Mar 2018 06:47:27 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7773897606236434998==" MIME-Version: 1.0 Subject: Re: Review Request 66025: Converted `JSON::String` to bool and integers. From: Qian Zhang To: Chun-Hung Hsiao , Benjamin Mahler Cc: Qian Zhang , mesos Date: Tue, 13 Mar 2018 06:47:27 -0000 Message-ID: <20180313064727.38973.92641@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Qian Zhang X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/66025/ X-Sender: Qian Zhang References: <20180312215324.64119.28863@reviews-vm2.apache.org> In-Reply-To: <20180312215324.64119.28863@reviews-vm2.apache.org> Reply-To: Qian Zhang X-ReviewRequest-Repository: mesos --===============7773897606236434998== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On March 13, 2018, 5:53 a.m., Benjamin Mahler wrote: > > Can we clarify in the commit message that we're doing this to match Google's json -> protobuf behavior? Sure. - Qian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66025/#review199040 ----------------------------------------------------------- On March 12, 2018, 9:28 a.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66025/ > ----------------------------------------------------------- > > (Updated March 12, 2018, 9:28 a.m.) > > > Review request for mesos, Benjamin Mahler and Chun-Hung Hsiao. > > > Bugs: MESOS-8656 > https://issues.apache.org/jira/browse/MESOS-8656 > > > Repository: mesos > > > Description > ------- > > Previsouly when converting a JSON to a protobuf message in stout, we > cannot handle the fields like below which are actually valid. > "int32": "-2147483647" > "int64": "-9223372036854775807" > "bool": "true" > The conversion will fail with an error like "Not expecting a JSON string > for field 'int32'". > > So in this patch, `Try operator()(const JSON::String& string)` > was enhanced to be able to convert `JSON::String` to bool and integers. > > > Diffs > ----- > > 3rdparty/stout/include/stout/protobuf.hpp 4a1605e5130dbf7e8286dbb43d0d04ab4394e79a > > > Diff: https://reviews.apache.org/r/66025/diff/1/ > > > Testing > ------- > > sudo make check > > > Thanks, > > Qian Zhang > > --===============7773897606236434998==--