use ujson as JSON en/decoder if available

This commit is contained in:
Rahiel Kasim 2016-08-26 09:40:46 +02:00
parent ffff0938f4
commit fcda567f8c
3 changed files with 13 additions and 3 deletions

View file

@ -18,7 +18,11 @@
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""Base class for Telegram Objects."""
import json
try:
import ujson as json
except ImportError:
import json
from abc import ABCMeta

View file

@ -18,7 +18,10 @@
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""This module contains methods to make POST and GET requests"""
import json
try:
import ujson as json
except ImportError:
import json
import os
import socket
import logging

View file

@ -3,7 +3,10 @@ import logging
from telegram import Update
from future.utils import bytes_to_native_str
from threading import Lock
import json
try:
import ujson as json
except ImportError:
import json
try:
import BaseHTTPServer
except ImportError: