Skip to content

Commit 6337781

Browse files
committed
Fix json dumps.
1 parent 537e7dd commit 6337781

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

eventsourcingdb/event/event.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ def verify_hash(self) -> None:
110110
self.data_content_type,
111111
])
112112

113-
print("########### Metadata: ", metadata)
114-
115113
metadata_bytes = metadata.encode("utf-8")
116-
data_bytes = json.dumps(self.data).encode("utf-8")
114+
data_bytes = json.dumps(
115+
self.data,
116+
separators=(',', ':')
117+
).encode("utf-8")
117118

118119
metadata_hash = sha256(metadata_bytes).hexdigest()
119120
data_hash = sha256(data_bytes).hexdigest()

0 commit comments

Comments
 (0)