Allow to disable ujson

This commit is contained in:
Alex Root Junior 2017-10-20 11:11:01 +03:00
parent 00400ea88b
commit f3c39ed9f1
2 changed files with 17 additions and 6 deletions

View file

@ -1,9 +1,9 @@
import io
import typing
import ujson
from typing import TypeVar
from .fields import BaseField
from ..utils import json
from ..utils.context import get_value
PROPS_ATTR_NAME = '_props'
@ -165,7 +165,7 @@ class TelegramObject(metaclass=MetaTelegramObject):
:return: JSON
:rtype: :obj:`str`
"""
return ujson.dumps(self.to_python())
return json.dumps(self.to_python())
@classmethod
def create(cls, *args, **kwargs):