Skip to content

Commit d692c7e

Browse files
committed
add test from issue 6
1 parent 768db58 commit d692c7e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

json-smart/src/test/java/net/minidev/json/test/TestBigValue.java

+11
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,15 @@ public void testBigInteger() {
4040
assertEquals(bigInt, obj.get("big"));
4141
assertEquals(bigInt.getClass(), obj.get("big").getClass());
4242
}
43+
/**
44+
* https://github.com/netplex/json-smart-v1/issues/6
45+
*/
46+
@Test
47+
public void testBigDouble() throws Exception {
48+
String content = "{\"customDouble\": 3.14159265358979323846}";
49+
System.out.printf("Input: %s\n", content);
50+
JSONParser parser = new JSONParser(DEFAULT_PERMISSIVE_MODE);
51+
JSONObject jwtContent = (JSONObject) parser.parse(content);
52+
System.out.printf("Output: %s\n", jwtContent.toJSONString());
53+
}
4354
}

0 commit comments

Comments
 (0)