Closed LambdaEd1th closed 4 years ago
Thankyou for pointing out, I'm gonna look into this special case
This problem can be fixed by using std::isnan and std::isinfstd::numeric_limits
My problem is when converting json2rton, if it reads a Infinity
, -Infinity
or NaN
, should it processes as string
or floating-point
type? And if it processes as floating-point
what if someone writes in json like this:
{"Infinity": "NaN"}
If someone writes "Infinity": "NaN" in json this should definitely be treated as a string, no need to detect that.
Thanks for pointing this out, luckily in python with the json library allow_nan is set to True by default, so this doesn't cause issues in my python alternative to RETON.
'Infinity', '-Infinity' and 'NaN' are existed in the float and double type.
When converting these values, the tool will convert them into null without distinction. Here is the sample file. PlantLevels.zip