Merge pull request #31 from kislyuk/patch-1
Fix typos in messages
Stefan Kögl authored 5 years ago
GitHub committed 5 years ago
161 | 161 | |
162 | 162 | |
163 | 163 | 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""" | |
165 | 165 | |
166 | 166 | # Array indices must not contain: |
167 | 167 | # leading zeros, signs, spaces, decimals, etc |
178 | 178 | |
179 | 179 | parts = pointer.split('/') |
180 | 180 | if parts.pop(0) != '': |
181 | raise JsonPointerException('location must starts with /') | |
181 | raise JsonPointerException('Location must start with /') | |
182 | 182 | |
183 | 183 | parts = [unescape(part) for part in parts] |
184 | 184 | self.parts = parts |
216 | 216 | |
217 | 217 | if len(self.parts) == 0: |
218 | 218 | if inplace: |
219 | raise JsonPointerException('cannot set root in place') | |
219 | raise JsonPointerException('Cannot set root in place') | |
220 | 220 | return value |
221 | 221 | |
222 | 222 | if not inplace: |