added workaround for json on Google AppEngine

Google AppEngine unfortunately does not offer json/simplejson where
we would expect it to be, but since they do offer django and django
comes with simplejson as a frozen dependency, we can import it
from there.

prior art:
http://github.com/facebook/python-sdk/blob/master/src/facebook.py#L50
This commit is contained in:
Thomas Schranz 2010-07-08 00:10:29 +08:00 committed by Armin Ronacher
parent f1a6fbe250
commit 0198313a22

View file

@ -26,7 +26,12 @@ except ImportError:
try:
import json
except ImportError:
json_available = False
try:
# Google Appengine offers simplejson via django
from django.utils import simplejson as json
except ImportError:
json_available = False
from werkzeug import Headers, wrap_file, is_resource_modified, cached_property
from werkzeug.exceptions import NotFound