|
|
|
|
|
by funcDropShadow
236 days ago
|
|
Even if we assume that JSON numbers are JavaScript numbers. There is the problem that some large natural numbers cannot be represented in double or float although some even larger numbers can be represented. This is very bad if you use these numbers as IDs. scala> (Long.MaxValue-1)
val res4: Long = 9223372036854775806
scala> (Long.MaxValue-1).toDouble.toLong
val res5: Long = 9223372036854775807
The fact that I used Scala is irrelevant here. That is true for many programming languages that 64 bit long and double types. |
|