import json

from .base_serializer import BaseSerializer


class JsonSerializer(BaseSerializer):
    '''Json serializer.'''

    def _serialize(self, data: dict, **kwargs) -> str:
        return json.dumps(data)

    def _deserialize(self, data: str, **kwargs) -> dict:
        return json.loads(data)

[(10, 'json.dumps', 'json.dumps', False, 'import json\n'), (13, 'json.loads', 'json.loads', False, 'import json\n')]