In my project, I use Spring @ResponseBody
and When I return a Object contains BigDecimal
like that :
{
"messageType" : "",
"messageContent" : "",
"valueObj" : 100.00,
"redirectUrl" : "",
"success" : false
}
then, the response body in browser is
{
"messageType" : "",
"messageContent" : "",
"valueObj" : 100,
"redirectUrl" : "",
"success" : false
}
I have a problem with BigDecimal Precision loosing. its precision (100.00 --> 100).
What is the problem with Spring to convert BigDecimal. Would you please provide me the solution?