aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json2proto.cpp
diff options
context:
space:
mode:
authorArslan Urtashev <urtashev@gmail.com>2022-02-10 16:48:55 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:55 +0300
commit1136f2ce7cce7bcc84e695272c0d92d4eb900c2b (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/json2proto.cpp
parentb97740540e7302cec9efa181e106ae1990a0cc1c (diff)
downloadydb-1136f2ce7cce7bcc84e695272c0d92d4eb900c2b.tar.gz
Restoring authorship annotation for Arslan Urtashev <urtashev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json2proto.cpp')
-rw-r--r--library/cpp/protobuf/json/json2proto.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp
index 5efa6d4b6c..640c10f5a5 100644
--- a/library/cpp/protobuf/json/json2proto.cpp
+++ b/library/cpp/protobuf/json/json2proto.cpp
@@ -36,10 +36,10 @@
static TString GetFieldName(const google::protobuf::FieldDescriptor& field,
const NProtobufJson::TJson2ProtoConfig& config) {
- if (config.NameGenerator) {
- return config.NameGenerator(field);
- }
-
+ if (config.NameGenerator) {
+ return config.NameGenerator(field);
+ }
+
if (config.UseJsonName) {
Y_ASSERT(!field.json_name().empty());
TString name = field.json_name();
@@ -409,10 +409,10 @@ namespace NProtobufJson {
NJson::TJsonReaderConfig jsonCfg;
jsonCfg.DontValidateUtf8 = true;
jsonCfg.AllowComments = config.AllowComments;
-
+
NJson::TJsonValue jsonValue;
ReadJsonTree(json, &jsonCfg, &jsonValue, /* throwOnError = */ true);
-
+
MergeJson2Proto(jsonValue, proto, config);
}
@@ -425,4 +425,4 @@ namespace NProtobufJson {
proto.Clear();
MergeJson2Proto(json, proto, config);
}
-}
+}