We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19c9c2f commit 34d6d02Copy full SHA for 34d6d02
tests.py
@@ -219,6 +219,13 @@ def test_leading_zero(self):
219
doc = [0, 1, 2]
220
self.assertRaises(JsonPointerException, resolve_pointer, doc, '/01')
221
222
+ def test_string_not_indexable(self):
223
+ doc = {"foo": "should-not-be-indexable"}
224
+ self.assertRaises(JsonPointerException, resolve_pointer, doc, "/foo/0")
225
+
226
+ ptr = JsonPointer("/foo/0")
227
+ self.assertRaises(JsonPointerException, ptr.resolve, doc)
228
229
230
class ToLastTests(unittest.TestCase):
231
0 commit comments