Babu Mahesh created OLINGO-1354:
-----------------------------------
Summary: ODataJsonDeserializer fails to de-serialize json with
BigDecimal values
Key: OLINGO-1354
URL: https://issues.apache.org/jira/browse/OLINGO-1354
Project: Olingo
Issue Type: Bug
Components: odata4-server
Affects Versions: (Java) V4 4.5.0, (Java) V4 4.4.0
Reporter: Babu Mahesh
ODataJsonDeserializer fails to de-serializer the json with big decimal values.
As it is using ObjectMapper internally to deserialize the json, but default
objectmapper instance can't deserialize json with bigdecimals.
Once we configure object mapper with
"objectMapper.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS,
true);", then it can deserialize the bigdecimal fields too.
As the deserialization logic is part of of private method "parseJsonTree",
couldn't override too.
So what should be ideal solution to this.
Payload
{
"EmploymentId" : "1234",
"TotalPay" : 10000000.0018,
"Status" : "HIRED"
}
Error message :
"message": "Entity Collection can not be found due to some internal server
error: Invalid value: 1.00000000018E7 for property: TotalPay"
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)