mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 15:24:19 +01:00
ensure_ascii on serialise (#6)
This commit is contained in:
@@ -36,7 +36,7 @@ class Event():
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def serialize(public_key: str, created_at: int, kind: int, tags: "list[list[str]]", content: str) -> bytes:
|
def serialize(public_key: str, created_at: int, kind: int, tags: "list[list[str]]", content: str) -> bytes:
|
||||||
data = [0, public_key, created_at, kind, tags, content]
|
data = [0, public_key, created_at, kind, tags, content]
|
||||||
data_str = json.dumps(data, separators=(',', ':'))
|
data_str = json.dumps(data, separators=(',', ':'), ensure_ascii=False)
|
||||||
return data_str.encode()
|
return data_str.encode()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user