1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-aiohttp/tests/fixtures.py

18 lines
485 B
Python
Raw Normal View History

2024-01-15 20:20:10 +00:00
# -*- coding: utf-8 -*-
# type: ignore
from __future__ import annotations
import typing
from bthlabs_jsonrpc_core import codecs
class AsyncJSONCodec(codecs.JSONCodec):
async def decode(self,
payload: str | bytes,
**decoder_kwargs) -> typing.Any:
return super().decode(payload, **decoder_kwargs)
async def encode(self, payload: typing.Any, **encoder_kwargs) -> str:
return super().encode(payload, **encoder_kwargs)