diff --git a/riak/client/__init__.py b/riak/client/__init__.py index 7f5ce4fe..9425bdba 100644 --- a/riak/client/__init__.py +++ b/riak/client/__init__.py @@ -19,7 +19,11 @@ under the License. """ -import json +try: + import simplejson as json +except ImportError: + import json + import random from weakref import WeakValueDictionary from riak.client.operations import RiakClientOperations diff --git a/riak/tests/test_kv.py b/riak/tests/test_kv.py index 65862410..6e4981f4 100644 --- a/riak/tests/test_kv.py +++ b/riak/tests/test_kv.py @@ -2,7 +2,10 @@ import os import cPickle import copy -import json +try: + import simplejson as json +except ImportError: + import json class NotJsonSerializable(object): diff --git a/riak/transports/http/transport.py b/riak/transports/http/transport.py index 9d8269d8..f95b7760 100644 --- a/riak/transports/http/transport.py +++ b/riak/transports/http/transport.py @@ -19,7 +19,11 @@ under the License. """ -import json +try: + import simplejson as json +except ImportError: + import json + import urllib import re import csv