3 ms·
Go's JSON parser parses all numbers as floats, for example
by bascule 10y ago
Go's JSON parser parses all numbers as floats, for example
- bascule 10y agoAlso note that the sinister problem here is that implementations which convert numbers to floats will silently lose precision when they overflow the range allowed in RFC 7159. This leads to quite subtle errors, and is why Twitter moved to encoding Snowflake IDs as strings: https://blog.twitter.com/2011/important-direct-message-ids-will-become-64-bit-snowflake-ids-on-sep-30 https://blog.twitter.com/2011/important-direct-message-ids-w...