diff --git a/jsonschema/_format.py b/jsonschema/_format.py index 2c07719b..5e483269 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -454,6 +454,9 @@ def is_relative_json_pointer(instance: object) -> bool: # https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3 if not isinstance(instance, str): return True + if not instance: + return False + non_negative_integer, rest = [], "" for i, character in enumerate(instance): if character.isdigit():