18 lines
485 B
Python
18 lines
485 B
Python
|
# -*- 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)
|