Fixed dataclass JSON serialization

This commit is contained in:
Fabio Manganiello 2023-04-24 01:18:17 +02:00
parent 9c03b028d7
commit bfa296e7c5
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -79,7 +79,7 @@ class Message:
return obj.value return obj.value
if is_dataclass(obj): if is_dataclass(obj):
obj = asdict(obj) return asdict(obj)
# Don't serialize I/O wrappers/objects # Don't serialize I/O wrappers/objects
if isinstance(obj, io.IOBase): if isinstance(obj, io.IOBase):