Closed as not planned
Closed as not planned
Description
I'm filing this issue as the result of conversation in pull request:
#32
Here is the test:
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule;
import org.json.JSONObject;
import org.junit.Assert;
import org.junit.Test;
public class JsonDoubleTest {
@Test
public void testDoubleParsing() throws Exception {
ObjectMapper objectMapper = new ObjectMapper().registerModule(new JsonOrgModule());
JSONObject jsonObject = objectMapper.readValue("{\"value\": 0.5 }", JSONObject.class);
Assert.assertEquals("java.lang.Double", jsonObject.get("value").getClass().getCanonicalName());
}
}
When I run it with Jackson 2.13.4 then it passes. When I run it with Jackson 2.15.0, it fails with error:
org.junit.ComparisonFailure:
Expected :java.lang.Double
Actual :java.math.BigDecimal
Metadata
Metadata
Assignees
Labels
No labels