diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /library/cpp/protobuf/json/proto2json_printer.cpp | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/proto2json_printer.cpp')
-rw-r--r-- | library/cpp/protobuf/json/proto2json_printer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/protobuf/json/proto2json_printer.cpp b/library/cpp/protobuf/json/proto2json_printer.cpp index 6123eab0f2..ae5bdbcd29 100644 --- a/library/cpp/protobuf/json/proto2json_printer.cpp +++ b/library/cpp/protobuf/json/proto2json_printer.cpp @@ -22,12 +22,12 @@ namespace NProtobufJson { if (config.UseJsonName) { Y_ASSERT(!field.json_name().empty()); - NewKeyStr = field.json_name(); - if (!field.has_json_name() && !NewKeyStr.empty()) { - // FIXME: https://st.yandex-team.ru/CONTRIB-139 - NewKeyStr[0] = AsciiToLower(NewKeyStr[0]); - } - NewKeyBuf = NewKeyStr; + NewKeyStr = field.json_name(); + if (!field.has_json_name() && !NewKeyStr.empty()) { + // FIXME: https://st.yandex-team.ru/CONTRIB-139 + NewKeyStr[0] = AsciiToLower(NewKeyStr[0]); + } + NewKeyBuf = NewKeyStr; return; } @@ -53,7 +53,7 @@ namespace NProtobufJson { case TProto2JsonConfig::FieldNameCamelCase: { NewKeyStr = field.name(); - if (!NewKeyStr.empty()) { + if (!NewKeyStr.empty()) { NewKeyStr[0] = AsciiToLower(NewKeyStr[0]); } NewKeyBuf = NewKeyStr; |