diff --git a/README.md b/README.md index 1987e33..87cc3ae 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ class JSONSerializer: return json.dumps(obj).encode() + NULL_BYTE def loads(self, data: bytes) -> dict: - data = bytes(data).split(NULL_BYTE, 1)[0] + data = data.split(NULL_BYTE, 1)[0] return json.loads(data) ``` diff --git a/shared_memory_dict/serializers.py b/shared_memory_dict/serializers.py index 617e64f..7fc0b74 100644 --- a/shared_memory_dict/serializers.py +++ b/shared_memory_dict/serializers.py @@ -18,7 +18,7 @@ def dumps(self, obj: dict) -> bytes: return json.dumps(obj).encode() + NULL_BYTE def loads(self, data: bytes) -> dict: - data = bytes(data).split(NULL_BYTE, 1)[0] + data = data.split(NULL_BYTE, 1)[0] return json.loads(data)