summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jsonpatch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/jsonpatch.py b/jsonpatch.py
index c4cbb30..43c68e5 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -105,7 +105,7 @@ def multidict(ordered_pairs):
# The "object_pairs_hook" parameter is used to handle duplicate keys when
# loading a JSON object.
-json.load = functools.partial(json.load, object_pairs_hook=multidict)
+_jsonloads = functools.partial(json.loads, object_pairs_hook=multidict)
def apply_patch(doc, patch, in_place=False):
@@ -256,7 +256,7 @@ class JsonPatch(object):
:return: :class:`JsonPatch` instance.
"""
- patch = json.loads(patch_str)
+ patch = _jsonloads(patch_str)
return cls(patch)
@classmethod