diff options
| author | Nikolay Gaivoronskiy <[email protected]> | 2022-02-10 16:50:36 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:36 +0300 | 
| commit | 33c469601b3522a2fda377b9b30769b8229c4e18 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
| parent | 2b9a5192b60a943c9029ab98c62719afe9f4ff96 (diff) | |
Restoring authorship annotation for Nikolay Gaivoronskiy <[email protected]>. Commit 2 of 2.
| -rw-r--r-- | build/ya.conf.json | 4 | ||||
| -rw-r--r-- | library/cpp/protobuf/json/json2proto.cpp | 32 | 
2 files changed, 18 insertions, 18 deletions
diff --git a/build/ya.conf.json b/build/ya.conf.json index ab3f880cf8e..5f7cc875d61 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -6827,7 +6827,7 @@          "yp-util": {              "formula": {                  "sandbox_id": [ -                    1204918529  +                    1204918529                  ],                  "match": "yp_util"              }, @@ -6840,7 +6840,7 @@          "yp": {              "formula": {                  "sandbox_id": [ -                    1204919943  +                    1204919943                  ],                  "match": "YP"              }, diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp index 0098a53a1bf..640c10f5a51 100644 --- a/library/cpp/protobuf/json/json2proto.cpp +++ b/library/cpp/protobuf/json/json2proto.cpp @@ -11,7 +11,7 @@  #include <util/string/ascii.h>  #include <util/string/cast.h> -#define JSON_TO_FIELD(EProtoCppType, name, json, JsonCheckType, ProtoSet, JsonGet)        \  +#define JSON_TO_FIELD(EProtoCppType, name, json, JsonCheckType, ProtoSet, JsonGet)        \      case FieldDescriptor::EProtoCppType: {                                          \          if (config.CastRobust) {                                                    \              reflection->ProtoSet(&proto, &field, json.JsonGet##Robust());           \ @@ -26,7 +26,7 @@                  reflection->ProtoSet(&proto, &field, FromString(json.GetString())); \                  break;                                                              \              }                                                                       \ -            ythrow yexception() << "Invalid type of JSON field " << name << ": "    \  +            ythrow yexception() << "Invalid type of JSON field " << name << ": "    \                                  << #JsonCheckType << "() failed while "             \                                  << #EProtoCppType << " is expected.";               \          }                                                                           \ @@ -194,13 +194,13 @@ Json2SingleField(const NJson::TJsonValue& json,      const NJson::TJsonValue& fieldJson = name ? json[name] : json;      switch (field.cpp_type()) { -        JSON_TO_FIELD(CPPTYPE_INT32, field.name(), fieldJson, IsInteger, SetInt32, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_INT64, field.name(), fieldJson, IsInteger, SetInt64, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_UINT32, field.name(), fieldJson, IsInteger, SetUInt32, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_UINT64, field.name(), fieldJson, IsUInteger, SetUInt64, GetUInteger);  -        JSON_TO_FIELD(CPPTYPE_DOUBLE, field.name(), fieldJson, IsDouble, SetDouble, GetDouble);  -        JSON_TO_FIELD(CPPTYPE_FLOAT, field.name(), fieldJson, IsDouble, SetFloat, GetDouble);  -        JSON_TO_FIELD(CPPTYPE_BOOL, field.name(), fieldJson, IsBoolean, SetBool, GetBoolean);  +        JSON_TO_FIELD(CPPTYPE_INT32, field.name(), fieldJson, IsInteger, SetInt32, GetInteger); +        JSON_TO_FIELD(CPPTYPE_INT64, field.name(), fieldJson, IsInteger, SetInt64, GetInteger); +        JSON_TO_FIELD(CPPTYPE_UINT32, field.name(), fieldJson, IsInteger, SetUInt32, GetInteger); +        JSON_TO_FIELD(CPPTYPE_UINT64, field.name(), fieldJson, IsUInteger, SetUInt64, GetUInteger); +        JSON_TO_FIELD(CPPTYPE_DOUBLE, field.name(), fieldJson, IsDouble, SetDouble, GetDouble); +        JSON_TO_FIELD(CPPTYPE_FLOAT, field.name(), fieldJson, IsDouble, SetFloat, GetDouble); +        JSON_TO_FIELD(CPPTYPE_BOOL, field.name(), fieldJson, IsBoolean, SetBool, GetBoolean);          case FieldDescriptor::CPPTYPE_STRING: {              JsonString2Field(fieldJson, proto, field, config); @@ -269,13 +269,13 @@ Json2RepeatedFieldValue(const NJson::TJsonValue& jsonValue,      using namespace google::protobuf;      switch (field.cpp_type()) { -        JSON_TO_FIELD(CPPTYPE_INT32, field.name(), jsonValue, IsInteger, AddInt32, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_INT64, field.name(), jsonValue, IsInteger, AddInt64, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_UINT32, field.name(), jsonValue, IsInteger, AddUInt32, GetInteger);  -        JSON_TO_FIELD(CPPTYPE_UINT64, field.name(), jsonValue, IsUInteger, AddUInt64, GetUInteger);  -        JSON_TO_FIELD(CPPTYPE_DOUBLE, field.name(), jsonValue, IsDouble, AddDouble, GetDouble);  -        JSON_TO_FIELD(CPPTYPE_FLOAT, field.name(), jsonValue, IsDouble, AddFloat, GetDouble);  -        JSON_TO_FIELD(CPPTYPE_BOOL, field.name(), jsonValue, IsBoolean, AddBool, GetBoolean);  +        JSON_TO_FIELD(CPPTYPE_INT32, field.name(), jsonValue, IsInteger, AddInt32, GetInteger); +        JSON_TO_FIELD(CPPTYPE_INT64, field.name(), jsonValue, IsInteger, AddInt64, GetInteger); +        JSON_TO_FIELD(CPPTYPE_UINT32, field.name(), jsonValue, IsInteger, AddUInt32, GetInteger); +        JSON_TO_FIELD(CPPTYPE_UINT64, field.name(), jsonValue, IsUInteger, AddUInt64, GetUInteger); +        JSON_TO_FIELD(CPPTYPE_DOUBLE, field.name(), jsonValue, IsDouble, AddDouble, GetDouble); +        JSON_TO_FIELD(CPPTYPE_FLOAT, field.name(), jsonValue, IsDouble, AddFloat, GetDouble); +        JSON_TO_FIELD(CPPTYPE_BOOL, field.name(), jsonValue, IsBoolean, AddBool, GetBoolean);          case FieldDescriptor::CPPTYPE_STRING: {              JsonString2Field(jsonValue, proto, field, config);  | 
