Be flexible where simplejson comes from
diff --git a/apiclient/discovery.py b/apiclient/discovery.py
index d15c5b2..5a0ba33 100644
--- a/apiclient/discovery.py
+++ b/apiclient/discovery.py
@@ -25,11 +25,20 @@
import logging
import os
import re
-import simplejson
import uritemplate
import urllib
import urlparse
+try:
+ import simplejson
+except ImportError:
+ try:
+ # Try to import from django, should work on App Engine
+ from django.utils import simplejson
+ except ImportError:
+ # Should work for Python2.6 and higher.
+ import json as simplejson
+
class HttpError(Exception):
pass