mirror of
https://github.com/nlohmann/json.git
synced 2025-07-25 13:41:56 +03:00
Merge branch 'feature/issue329' into develop
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user