According to this line, it is checked if the number could be fitted into an integer. But it does not work for long values that exceeds maximum value of integers. So for example, given a long value = 4031571442644776, ujson would output it as a double value like "4.031571442644776E15", that's incorrect.
A possible solution is to rewrite that toInt to toLong.
ID: 268
Original Author: lilac
https://github.com/lihaoyi/upickle/blob/a7238c05406f9e0767745b47e96cb31e166649d4/ujson/src/ujson/Renderer.scala#L118
According to this line, it is checked if the number could be fitted into an integer. But it does not work for long values that exceeds maximum value of integers. So for example, given a long value = 4031571442644776, ujson would output it as a double value like "4.031571442644776E15", that's incorrect.
A possible solution is to rewrite that toInt to toLong. ID: 268 Original Author: lilac