diff --git a/pizzicore/pizzicore.py b/pizzicore/pizzicore.py index dc91cd9..a4765d6 100644 --- a/pizzicore/pizzicore.py +++ b/pizzicore/pizzicore.py @@ -138,7 +138,7 @@ async def websocket_counter(websocket: WebSocket, cid: int): while True: try: val = counter_store.get(cid) - await websocket.send_json(Value(counter=cid, value=val).json()) + await websocket.send_json(jsonable_encoder(Value(counter=cid, value=val))) except WebSocketDisconnect: logging.debug("client disconnected") manager.unsubscribe(cid, q)