Skip to content
Myr

added workaround for json on Google AppEngine

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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

authored by Thomas Schranz · committed by Armin Ronacher · parent f1a6fbe · Browse files · 1 file+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:flask/helpers.py+6 added-1 removed
24 unmodified lines
25except ImportError:26 try:27 import json28 except ImportError:29 try:30 # Google Appengine offers simplejson via django31 from django.utils import simplejson as json32 except ImportError:29 json_available = False33 json_available = False343536from werkzeug import Headers, wrap_file, is_resource_modified, cached_property37from werkzeug.exceptions import NotFound3839from jinja2 import FileSystemLoader
364 unmodified lines