Skip to content

Commit d62e138

Browse files
Fix regex matching for array index validation
1 parent 9087321 commit d62e138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpointer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def get_part(cls, doc, part):
230230
if part == '-':
231231
return part
232232

233-
if not JsonPointer._RE_ARRAY_INDEX.match(str(part)):
233+
if not JsonPointer._RE_ARRAY_INDEX.fullmatch(str(part)):
234234
raise JsonPointerException("'%s' is not a valid sequence index" % part)
235235

236236
return int(part)

0 commit comments

Comments
 (0)