diff --git a/json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/SimpleReadTest.java b/json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/SimpleReadTest.java index c1aae01..9bf19d9 100644 --- a/json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/SimpleReadTest.java +++ b/json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/SimpleReadTest.java @@ -43,6 +43,16 @@ public void testReadArray() throws Exception assertEquals(0, array2.length()); } + public void testDouble() throws Exception + { + ObjectMapper mapper = new ObjectMapper(); + mapper.registerModule(new JsonOrgModule()); + + JSONObject val = mapper.readValue("{\"val\":0.5}", JSONObject.class); + assertEquals(0.5d, val.getDouble("val")); + assertEquals(new BigDecimal(0.5d), val.get("val")); + } + public void testBigInteger() throws Exception { JSONObject val = MAPPER.readValue("{\"val\":2e308}", JSONObject.class);