mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Remove plain json serializer implementation
This commit is contained in:
parent
867d59b930
commit
b6434040de
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
import logging
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
@ -38,14 +37,6 @@ class WebSocketSerializer(ABC):
|
|||
await self._websocket.close(code)
|
||||
|
||||
|
||||
class JSONWebSocketSerializer(WebSocketSerializer):
|
||||
def _serialize(self, data):
|
||||
return json.dumps(data, default=_json_default)
|
||||
|
||||
def _deserialize(self, data):
|
||||
return json.loads(data, object_hook=_json_object_hook)
|
||||
|
||||
|
||||
class HybridJSONWebSocketSerializer(WebSocketSerializer):
|
||||
def _serialize(self, data) -> str:
|
||||
return str(orjson.dumps(data, default=_json_default), "utf-8")
|
||||
|
|
Loading…
Reference in New Issue
Block a user