----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59987/#review199052 -----------------------------------------------------------
3rdparty/stout/include/stout/protobuf.hpp Lines 807-810 (patched) <https://reviews.apache.org/r/59987/#comment279349> How about making this a lambda inside `protobuf()` so we don't expose this? 3rdparty/stout/include/stout/protobuf.hpp Lines 1018-1059 (patched) <https://reviews.apache.org/r/59987/#comment279350> How about: ``` JSON::Value key = value_for_field(entry, key_field); if (key.is<JSON::String>()) { name = key.as<JSON::String>().value; } else { name = jsonify(key); } ``` - Chun-Hung Hsiao On March 12, 2018, 7:15 a.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59987/ > ----------------------------------------------------------- > > (Updated March 12, 2018, 7:15 a.m.) > > > Review request for mesos, Anand Mazumdar, Benjamin Mahler, Chun-Hung Hsiao, > and Zhitao Li. > > > Bugs: MESOS-7656 > https://issues.apache.org/jira/browse/MESOS-7656 > > > Repository: mesos > > > Description > ------- > > Map is a feature of proto2 syntax, but it can only be compiled > with 3.0.0+ protobuf compiler, see the following discussion for > details: > > https://groups.google.com/forum/#!topic/protobuf/p4WxcplrlA4 > > We have already upgraded the compiler from 2.6.1 to 3.3.0 in > MESOS-7228. This patch adds map support in the json <-> protobuf > conversion in stout. > > > Diffs > ----- > > 3rdparty/stout/include/stout/protobuf.hpp > 4a1605e5130dbf7e8286dbb43d0d04ab4394e79a > > > Diff: https://reviews.apache.org/r/59987/diff/8/ > > > Testing > ------- > > > Thanks, > > Qian Zhang > >