returns
Traceback (most recent call last):
File "C:\Users\Mike\IdeaProjects\test\test.py", line 13, in
print(patch.apply(dictionary))
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpatch.py", line 692, in apply
obj = operation.apply(obj)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpatch.py", line 282, in apply
subobj, part = self.pointer.to_last(obj)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpointer.py", line 196, in to_last
doc = self.walk(doc, part)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpointer.py", line 291, in walk
raise JsonPointerException("member '%s' not found in %s" % (part, doc))
jsonpointer.JsonPointerException: member 'contact' not found in {'system': {'name': 'test-system'}}
Dont worry, having looked at the source I can understand why you dont support this and will implement a utiliy to ensure a path exists before using the patch
returns Traceback (most recent call last): File "C:\Users\Mike\IdeaProjects\test\test.py", line 13, in
print(patch.apply(dictionary))
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpatch.py", line 692, in apply
obj = operation.apply(obj)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpatch.py", line 282, in apply
subobj, part = self.pointer.to_last(obj)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpointer.py", line 196, in to_last
doc = self.walk(doc, part)
File "C:\Users\Mike\IdeaProjects\test\venv\lib\site-packages\jsonpointer.py", line 291, in walk
raise JsonPointerException("member '%s' not found in %s" % (part, doc))
jsonpointer.JsonPointerException: member 'contact' not found in {'system': {'name': 'test-system'}}