SpinJsonNode - wrong double value when reading

Hello,

I have json which looks like this: {“value”: 1.123456789123E+11}

When I’m using method numberValue().doubleValue() I get incorrect result:

SpinJsonNode node = S(jsonString)
node.jsonPath(“value”).numberValue().doubleValue();1.12345677824E11

When I unwrap node to JacksonJsonNode, the value is correct:

JacksonJsonNode jacksonJsonNode = (JacksonJsonNode) node;
final JsonNode unwrap = jacksonJsonNode.unwrap();
final DoubleNode doubleNode = (DoubleNode) unwrap.path(“value”);
final double doubleValueCorrect = doubleNode.doubleValue();1.123456789123E11

Can anyone explain to me how to correctly read values ​​using SpinJsonNode? I’m using Camunda 7.10.

1 Like