From 97e18f38e03961c8984969214bdc082c2a4560e4 Mon Sep 17 00:00:00 2001 From: Jonathan Hilliard Date: Tue, 28 Jan 2020 10:56:41 -0600 Subject: Changing previous type comparison to just comparing how json.dumps renders 2 values. This avoids flagging mismatches between classes which happen to be different but which are JSONified as the same thing. --- jsonpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jsonpatch.py') diff --git a/jsonpatch.py b/jsonpatch.py index a72fcea..5454f56 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -825,7 +825,7 @@ class DiffBuilder(object): isinstance(dst, MutableSequence): self._compare_lists(_path_join(path, key), src, dst) - elif src == dst and type(src) == type(dst): + elif json.dumps(src) == json.dumps(dst): return else: -- cgit v1.2.1