#449 use stdlib json module if ujson is unavailible

This commit is contained in:
Alec Buckenheimer 2017-02-16 15:03:52 -05:00
parent f932d16ba7
commit f9ab24a077

View File

@ -4,7 +4,10 @@ from http.cookies import SimpleCookie
from httptools import parse_url from httptools import parse_url
from urllib.parse import parse_qs from urllib.parse import parse_qs
from ujson import loads as json_loads try:
from ujson import loads as json_loads
except ImportError:
from json import loads as json_loads
from sanic.exceptions import InvalidUsage from sanic.exceptions import InvalidUsage
from sanic.log import log from sanic.log import log