Commit 7392340e authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[hash] Import simplejson as json to make it easy to swap

parent 8a28d08f
......@@ -46,7 +46,7 @@ Also forward importing from :py:mod:`beat.backend.python.hash`
import collections
import simplejson
import simplejson as json
from beat.backend.python.hash import * # noqa
from beat.backend.python.hash import _sha256 # noqa
......@@ -165,9 +165,8 @@ def hashJSONStr(contents, description):
return hashJSON( # noqa
simplejson.loads(contents, object_pairs_hook=collections.OrderedDict),
json.loads(contents, object_pairs_hook=collections.OrderedDict), description
) # preserve order
except simplejson.JSONDecodeError:
except json.JSONDecodeError:
# falls back to normal file content hashing
return hash(contents)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment