Closed mateusneresrb closed 1 week ago
It ends up in the Double.parseDouble of this class and removes the 0. The correct thing to do would be to return a BigDecimal, but this scenario only occurs with a string longer than 18 characters.
10.50 and 10.5 are the same value. fill free to re-format flot number to keep extra tailling zero, or store you digits as string.
10,50 e 10,5 são o mesmo valor. preencha livre para reformatar o número do flot para manter o zero de rejeitos extras ou armazene seus dígitos como string.
I see, they're the same value, but after I turn it into a bigdecimal, because I need the 0, it ends up removing it. One option would be to use a custom mapper?
Update your model and store your numbers as strings.
Hello, good afternoon, is there any way to maintain the precision of a number when serializing? When I try to serialize the number
10.50
, it converts it to a double and removes the final 0, thus maintaining the precision.I'm using json-smart together with jsonpath.