summaryrefslogtreecommitdiff
path: root/jsonpatch.py
diff options
context:
space:
mode:
authorBrian Rosmaita <rosmaita.fossdev@gmail.com>2017-12-04 15:53:59 -0500
committerBrian Rosmaita <rosmaita.fossdev@gmail.com>2017-12-04 15:53:59 -0500
commite500b4d90e53468a0b51201ec1df51867ce67736 (patch)
treecc0768b7e1cd73918ec6769f72cebfbe017cc628 /jsonpatch.py
parentdf0c56d592c9f1d0fada201b7fa66d9d359ac7a3 (diff)
downloadpython-json-patch-e500b4d90e53468a0b51201ec1df51867ce67736.tar.gz
Remove extraneous 'value' field for op:remove (#76)
RFC 6902 section 4.2 [0] does not define a 'value' field for the 'remove' operation. The commit "Merge _op_base classes into PatchOperation classes" [1] introduced a 'value' field in _item_removed() in the DiffBuilder class. This patch removes the 'value' field from the 'remove' operation, adds a new test, and revises some other tests. [0] https://tools.ietf.org/html/rfc6902#section-4.2 [1] https://github.com/stefankoegl/python-json-patch/commit/03aa14e8209d59522476726d55bfabf86a28929e
Diffstat (limited to 'jsonpatch.py')
-rw-r--r--jsonpatch.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/jsonpatch.py b/jsonpatch.py
index cd08a82..291e876 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -730,7 +730,6 @@ class DiffBuilder(object):
new_op = RemoveOperation({
'op': 'remove',
'path': _path_join(path, key),
- 'value': item,
})
index = self.take_index(item, _ST_ADD)
new_index = self.insert(new_op)