diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /library/cpp/protobuf/json/proto2json_printer.cpp | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 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 ae5bdbcd29..6123eab0f2 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; |