From 2d31d0c70680399d45bffdb7de620e945b2cb6bc Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 21 Jun 2018 13:05:27 -0400 Subject: protostream_objectwriter: fix bug when Any is directly embedded in a map. This came up when trying to round-trip the JSON<->proto3 conversion for Envoy's envoy.admin.v2alpha.ConfigDump (https://github.com/envoyproxy/envoy/blob/b903c1dc984593f8e95e0569c1503dc5d85fbe34/api/envoy/admin/v2alpha/config_dump.proto#L29). Validated fix on the Envoy code base and via the provided unit test. Signed-off-by: Harvey Tuch --- src/google/protobuf/util/json_util_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/google/protobuf/util/json_util_test.cc') diff --git a/src/google/protobuf/util/json_util_test.cc b/src/google/protobuf/util/json_util_test.cc index ed9092df..a2a84b57 100644 --- a/src/google/protobuf/util/json_util_test.cc +++ b/src/google/protobuf/util/json_util_test.cc @@ -284,7 +284,7 @@ TEST_F(JsonUtilTest, ParsePrimitiveMapIn) { JsonPrintOptions print_options; print_options.always_print_primitive_fields = true; JsonParseOptions parse_options; - EXPECT_EQ("{\"other\":\"\",\"things\":[],\"mapInput\":{}}", + EXPECT_EQ("{\"other\":\"\",\"things\":[],\"mapInput\":{},\"mapAny\":{}}", ToJson(message, print_options)); MapIn other; ASSERT_TRUE(FromJson(ToJson(message, print_options), &other, parse_options)); -- cgit v1.2.3