Use simplejson if present instead of the stdlib json module.

The simplejson parser drop-in compatible with the builtin python JSON
parser, but much faster. In particular, this makes operations like
reindexing quicker.
This commit is contained in:
Andrew Snare
2014-06-25 10:21:36 +02:00
committed by Honza Král
parent 7a1aafa0b3
commit 4d37a54c95
3 changed files with 12 additions and 3 deletions
+3
View File
@@ -1,4 +1,7 @@
import logging import logging
try:
import simplejson as json
except ImportError:
import json import json
from ..exceptions import TransportError, HTTP_EXCEPTIONS from ..exceptions import TransportError, HTTP_EXCEPTIONS
+3
View File
@@ -1,4 +1,7 @@
import time import time
try:
import simplejson as json
except ImportError:
import json import json
from ..exceptions import TransportError, ConnectionError, ImproperlyConfigured from ..exceptions import TransportError, ConnectionError, ImproperlyConfigured
+3
View File
@@ -1,3 +1,6 @@
try:
import simplejson as json
except ImportError:
import json import json
from datetime import date, datetime from datetime import date, datetime
from decimal import Decimal from decimal import Decimal