Codebase list python-json-pointer / ae613eb
Merge pull request #31 from kislyuk/patch-1 Fix typos in messages Stefan Kögl authored 5 years ago GitHub committed 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
161161
162162
163163 class JsonPointer(object):
164 """A JSON Pointer that can reference parts of an JSON document"""
164 """A JSON Pointer that can reference parts of a JSON document"""
165165
166166 # Array indices must not contain:
167167 # leading zeros, signs, spaces, decimals, etc
178178
179179 parts = pointer.split('/')
180180 if parts.pop(0) != '':
181 raise JsonPointerException('location must starts with /')
181 raise JsonPointerException('Location must start with /')
182182
183183 parts = [unescape(part) for part in parts]
184184 self.parts = parts
216216
217217 if len(self.parts) == 0:
218218 if inplace:
219 raise JsonPointerException('cannot set root in place')
219 raise JsonPointerException('Cannot set root in place')
220220 return value
221221
222222 if not inplace: