aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json2proto.cpp
diff options
context:
space:
mode:
authorart-snake <art-snake@yandex-team.ru>2022-02-10 16:50:35 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:35 +0300
commitdc5517df41fe6319ff249956fe5650e4bbc3e660 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/json2proto.cpp
parent1700010e2088971894d12a7a16d6004866f986fd (diff)
downloadydb-dc5517df41fe6319ff249956fe5650e4bbc3e660.tar.gz
Restoring authorship annotation for <art-snake@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json2proto.cpp')
-rw-r--r--library/cpp/protobuf/json/json2proto.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp
index f19204ac35..640c10f5a5 100644
--- a/library/cpp/protobuf/json/json2proto.cpp
+++ b/library/cpp/protobuf/json/json2proto.cpp
@@ -19,10 +19,10 @@
} \
if (!json.JsonCheckType()) { \
if (config.CastFromString && json.IsString()) { \
- if (config.DoNotCastEmptyStrings && json.GetString().empty()) { \
- /* Empty string is same as "no value" for scalar types.*/ \
- break; \
- } \
+ if (config.DoNotCastEmptyStrings && json.GetString().empty()) { \
+ /* Empty string is same as "no value" for scalar types.*/ \
+ break; \
+ } \
reflection->ProtoSet(&proto, &field, FromString(json.GetString())); \
break; \
} \
@@ -335,7 +335,7 @@ Json2RepeatedField(const NJson::TJsonValue& json,
}
}
- if (fieldJson.GetType() != NJson::JSON_ARRAY && !config.MapAsObject && !config.VectorizeScalars && !config.ValueVectorizer) {
+ if (fieldJson.GetType() != NJson::JSON_ARRAY && !config.MapAsObject && !config.VectorizeScalars && !config.ValueVectorizer) {
ythrow yexception() << "JSON field doesn't represent an array for "
<< name
<< "(actual type is "
@@ -361,10 +361,10 @@ Json2RepeatedField(const NJson::TJsonValue& json,
for (const NJson::TJsonValue& jsonValue : jsonArray) {
Json2RepeatedFieldValue(jsonValue, proto, field, config, reflection);
}
- } else if (config.ValueVectorizer) {
- for (const NJson::TJsonValue& jsonValue : config.ValueVectorizer(fieldJson)) {
- Json2RepeatedFieldValue(jsonValue, proto, field, config, reflection);
- }
+ } else if (config.ValueVectorizer) {
+ for (const NJson::TJsonValue& jsonValue : config.ValueVectorizer(fieldJson)) {
+ Json2RepeatedFieldValue(jsonValue, proto, field, config, reflection);
+ }
} else if (config.VectorizeScalars) {
Json2RepeatedFieldValue(fieldJson, proto, field, config, reflection);
}