Skip to content

Commit cf31515

Browse files
committed
bit more testing for JsonPointer
1 parent a6ed7f7 commit cf31515

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/com/fasterxml/jackson/databind/node/TestJsonPointer.java

+15
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,19 @@ public void testIt() throws Exception
3131
assertTrue(SAMPLE_ROOT.at("/Image/Depth").isMissingNode());
3232
assertTrue(SAMPLE_ROOT.at("/Image/1").isMissingNode());
3333
}
34+
35+
// To help verify [Core#133]; should be fine with "big numbers" as property keys
36+
public void testLongNumbers() throws Exception
37+
{
38+
39+
// First, with small int key
40+
JsonNode root = objectMapper().readTree("{\"123\" : 456}");
41+
JsonNode jn2 = root.at("/123");
42+
assertEquals(456, jn2.asInt());
43+
44+
// and then with above int-32:
45+
root = objectMapper().readTree("{\"35361706045\" : 1234}");
46+
jn2 = root.at("/35361706045");
47+
assertEquals(1234, jn2.asInt());
48+
}
3449
}

0 commit comments

Comments
 (0)