forked from loafle/openapi-generator-original
[cpp-restsdk] Fix ModelBase::fromJson(const web::json::value&, int64_t&) bug which incorrectly returns zero (#10300)
* BUG FIX: A missing semicolon in cpp-pistache-server generated code. * BUG FIX: Provide default values of schema in cpp-pistache-server generated code. * BUG FIX: Provide default values of schema in cpp-pistache-server generated code. * Fix a bug in cpprest-sdk generator (Issue #8450) * Fix a bug in cpprest-sdk generator (Issue #8450) * Fix a bug in cpprest-sdk generator (Issue #8450) * Revert "Fix a bug in cpprest-sdk generator (Issue #8450)" This reverts commit 7d8f842860f94deb78fb519716f9984e1efad878. * Fix a bug in cpprest-sdk generator (Issue #8450)
This commit is contained in:
parent
d2d06f0503
commit
4626b185fe
@ -264,7 +264,7 @@ bool ModelBase::fromJson( const web::json::value& val, int32_t & outVal )
|
||||
}
|
||||
bool ModelBase::fromJson( const web::json::value& val, int64_t & outVal )
|
||||
{
|
||||
outVal = !val.is_null() ? std::numeric_limits<int64_t>::quiet_NaN() : val.as_number().to_int64();
|
||||
outVal = !val.is_number() ? std::numeric_limits<int64_t>::quiet_NaN() : val.as_number().to_int64();
|
||||
return val.is_number();
|
||||
}
|
||||
bool ModelBase::fromJson( const web::json::value& val, utility::string_t & outVal )
|
||||
|
@ -275,7 +275,7 @@ bool ModelBase::fromJson( const web::json::value& val, int32_t & outVal )
|
||||
}
|
||||
bool ModelBase::fromJson( const web::json::value& val, int64_t & outVal )
|
||||
{
|
||||
outVal = !val.is_null() ? std::numeric_limits<int64_t>::quiet_NaN() : val.as_number().to_int64();
|
||||
outVal = !val.is_number() ? std::numeric_limits<int64_t>::quiet_NaN() : val.as_number().to_int64();
|
||||
return val.is_number();
|
||||
}
|
||||
bool ModelBase::fromJson( const web::json::value& val, utility::string_t & outVal )
|
||||
|
Loading…
x
Reference in New Issue
Block a user