diff options
author | AlexSm <alex@ydb.tech> | 2023-12-27 23:31:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 23:31:58 +0100 |
commit | d67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch) | |
tree | 8674f2f1570877cb653e7ddcff37ba00288de15a /library/cpp/protobuf/json/proto2json_printer.cpp | |
parent | 1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff) | |
download | ydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz |
Import libs 4 (#758)
Diffstat (limited to 'library/cpp/protobuf/json/proto2json_printer.cpp')
-rw-r--r-- | library/cpp/protobuf/json/proto2json_printer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/protobuf/json/proto2json_printer.cpp b/library/cpp/protobuf/json/proto2json_printer.cpp index aa0823de0e..b2426f395a 100644 --- a/library/cpp/protobuf/json/proto2json_printer.cpp +++ b/library/cpp/protobuf/json/proto2json_printer.cpp @@ -408,10 +408,10 @@ namespace NProtobufJson { void TProto2JsonPrinter::PrintKeyValue(const NProtoBuf::Message& proto, IJsonOutput& json) { - const FieldDescriptor* keyField = proto.GetDescriptor()->FindFieldByName("key"); + const FieldDescriptor* keyField = proto.GetDescriptor()->map_key(); Y_ABORT_UNLESS(keyField, "Map entry key field not found."); TString key = MakeKey(proto, *keyField); - const FieldDescriptor* valueField = proto.GetDescriptor()->FindFieldByName("value"); + const FieldDescriptor* valueField = proto.GetDescriptor()->map_value(); Y_ABORT_UNLESS(valueField, "Map entry value field not found."); PrintSingleField(proto, *valueField, json, key, true); } |