Closed tesla-cat closed 1 year ago
my json data contains huge amount of NaNs, instead of parsing it into null and give me this error type must be number, but is null, why don't you just parse it into std::nan ?
type must be number, but is null
this will save users from so much trouble!!!
i know you wrote this https://json.nlohmann.me/features/types/number_handling/#nan-handling
but this is not user friendly, do i need to write if(! json_data.is_null()){ float x = json_data;} manually for every variable that is possibly NaN ?
if(! json_data.is_null()){ float x = json_data;}
.
No response
develop
Duplicate of #3799.
Description
my json data contains huge amount of NaNs, instead of parsing it into null and give me this error
type must be number, but is null
, why don't you just parse it into std::nan ?this will save users from so much trouble!!!
i know you wrote this https://json.nlohmann.me/features/types/number_handling/#nan-handling
but this is not user friendly, do i need to write
if(! json_data.is_null()){ float x = json_data;}
manually for every variable that is possibly NaN ?Reproduction steps
.
Expected vs. actual results
.
Minimal code example
No response
Error messages
No response
Compiler and operating system
.
Library version
.
Validation
develop
branch is used.