Closed Wend4r closed 2 years ago
JavaScript does not have distinct types for integers and floats, so JSON.stringify()
outputs 1.0
as 1
, which I can only interpret as an integer. JSONObject.FromFile()
and .FromString()
do support the JSON_DECODE_INT_AS_REAL
flag, which interprets all numbers as floats, but it's currently not possible to use decoding flags with an HTTP response. I will consider that for the future.
With #52, I can control float and integer values.
When does response from the backend on NodeJS, Rest In Pawn cannot read this integer float values through
JSONObject.GetFloat()
.But
JSONObject.GetFloat()
works in the case ofI suggest to make reading of integers even as float.