One of my API retruns an object which contains BigDecimal fields in it. The trailing 0s at the fractional part of the objects removed inside the response. What I want is to return what DB record gives me.
I’m trying to understand how serialization work behind the scenes.The object is annotated with @JsonUnwrapped
.
<code>// Return object is like:
Resp {
@JsonUnwrapped
Dto {
BigDecimal val;
}
}
</code>
<code>// Return object is like:
Resp {
@JsonUnwrapped
Dto {
BigDecimal val;
}
}
</code>
// Return object is like:
Resp {
@JsonUnwrapped
Dto {
BigDecimal val;
}
}
When val is set 10,1000
what I get as a response is 10.1
what I need is 10,1000
.
J21, spring 3.2.3, jackson-annotations-2.15.4