diff --git a/setup.py b/setup.py index 7215aba..893f8de 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,9 @@ setup(name='pyTelegramBotAPI', license='GPL2', keywords='telegram bot api tools', install_requires=['requests', 'six'], + extras_require={ + 'json': 'ujson', + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: 2', diff --git a/telebot/types.py b/telebot/types.py index f8f4434..bf724bf 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- -import json +try: + import ujson as json +except ImportError: + import json + import six from telebot import util