-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I am using Python 2.7.2 and did a pip install jsonpatch
I am seeing the following error when trying to apply a patch to my json doc.
patch = jsonpatch.apply_patch(data['request_body'], myPatch)
File "/Users/test/projects/venv/lib/python2.7/site-packages/jsonpatch.py", line 102, in apply_patch
return patch.apply(doc, in_place)
File "/Users/test/projects/venv/lib/python2.7/site-packages/jsonpatch.py", line 301, in apply
obj = operation.apply(obj)
File "/Users/test/projects/venv/lib/python2.7/site-packages/jsonpatch.py", line 393, in apply
subobj, part = self.pointer.to_last(obj)
File "/Users/test/projects/venv/lib/python2.7/site-packages/jsonpointer.py", line 129, in to_last
return doc, self.get_part(doc, self.parts[-1])
File "/Users/test/projects/venv/lib/python2.7/site-packages/jsonpointer.py", line 168, in get_part
raise JsonPointerException("Unknown document type '%s'" % (doc.class,))
JsonPointerException: Unknown document type '<type 'unicode'>'