Hi,
While trying to persist a Couchbase record, the attributes of BigDecimal type are automatically rounded off to 15 decimal digits while using JsonObject.fromJson(…). I believe it uses float64 (double) implicitly.
SampleCode:
(ObjectMapper is used to form the below JsonString from a POJO containing two BigDecimal types - There is no problem in this conversion.)
JsonObject.fromJson("{“latitude”:25.2527777777777777777777777777,“longitude”:55.3644444444444}")
Expected Result:
{“latitude”:25.2527777777777777777777777777,“longitude”:55.3644444444444}
Actual Result:
{“latitude”:25.252777777777776,“longitude”:55.3644444444444}
Please suggest a solution to retain the digits.