diff options
author | c5xheavy <c5xheavy@yandex-team.com> | 2022-07-24 15:48:11 +0300 |
---|---|---|
committer | c5xheavy <c5xheavy@yandex-team.com> | 2022-07-24 15:48:11 +0300 |
commit | aeea44b2f287f6def8991f49c342914ed65983fa (patch) | |
tree | c7315f1d08af60694bba40b704ecae9045d46f8c | |
parent | fb3e3def6d0ec962ba45ad577e0c93fb7cd37700 (diff) | |
download | ydb-aeea44b2f287f6def8991f49c342914ed65983fa.tar.gz |
fix json types validation
-rw-r--r-- | ydb/public/lib/json_value/ydb_json_value.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ydb/public/lib/json_value/ydb_json_value.cpp b/ydb/public/lib/json_value/ydb_json_value.cpp index 172e345c0a0..a8d48c77d45 100644 --- a/ydb/public/lib/json_value/ydb_json_value.cpp +++ b/ydb/public/lib/json_value/ydb_json_value.cpp @@ -802,6 +802,10 @@ namespace { || value.GetType() == NJson::EJsonValueType::JSON_UINTEGER && type == NJson::EJsonValueType::JSON_INTEGER) { return; } + if ((value.GetType() == NJson::EJsonValueType::JSON_INTEGER || value.GetType() == NJson::EJsonValueType::JSON_UINTEGER) + && type == NJson::EJsonValueType::JSON_DOUBLE) { + return; + } TStringStream str; NJsonWriter::TBuf writer(NJsonWriter::HEM_UNSAFE, &str); writer.WriteJsonValue(&value); |