3 ms·
Because JSON is a text format, nobody prevents you from encoding floats like this: { "int": 1, "float": 1.0 } Of course it's up to the parser implementation t
by Yaggo 9y ago
Because JSON is a text format, nobody prevents you from encoding floats like this:
{ "int": 1, "float": 1.0 }
Of course it's up to the parser implementation to interpret 1.0 as a float.
The spec is very relaxed about the number type:
https://tools.ietf.org/html/rfc7159#section-6 https://tools.ietf.org/html/rfc7159#section-6