Remove whitespace from json hash
Reasoning:
e5d8447f06 (commitcomment-11243708)
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
f79eb7b9ad
commit
f5ac1fa073
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import hashlib
|
||||||
|
|
||||||
|
|
||||||
def json_hash(obj):
|
def json_hash(obj):
|
||||||
dump = json.dumps(obj, sort_keys=True)
|
dump = json.dumps(obj, sort_keys=True, separators=(',', ':'))
|
||||||
h = hashlib.sha256()
|
h = hashlib.sha256()
|
||||||
h.update(dump)
|
h.update(dump)
|
||||||
return h.hexdigest()
|
return h.hexdigest()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue