Merge branch 'feature/issue329' into develop
This commit is contained in:
commit
737d43724f
4 changed files with 21 additions and 1 deletions
|
@ -8960,6 +8960,13 @@ basic_json_parser_63:
|
|||
{
|
||||
// parse with strtod
|
||||
result.m_value.number_float = str_to_float_t(static_cast<number_float_t*>(nullptr), NULL);
|
||||
|
||||
// replace infinity and NAN by null
|
||||
if (not std::isfinite(result.m_value.number_float))
|
||||
{
|
||||
type = value_t::null;
|
||||
result.m_value = basic_json::json_value();
|
||||
}
|
||||
}
|
||||
|
||||
// save the type
|
||||
|
|
|
@ -8257,6 +8257,13 @@ class basic_json
|
|||
{
|
||||
// parse with strtod
|
||||
result.m_value.number_float = str_to_float_t(static_cast<number_float_t*>(nullptr), NULL);
|
||||
|
||||
// replace infinity and NAN by null
|
||||
if (not std::isfinite(result.m_value.number_float))
|
||||
{
|
||||
type = value_t::null;
|
||||
result.m_value = basic_json::json_value();
|
||||
}
|
||||
}
|
||||
|
||||
// save the type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue