Coverage for /home/lvcong/PythonProjects/sanic-restful/sanic_restful/json.py : 50%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
settings = app.config.get('RESTFUL_JSON', {}) dumps = settings.pop('JSON_DUMP', None) or json_dumps # If we're in debug mode, and the indent is not set, we set it to a # reasonable value here. Note that this won't override any existing value # that was set. We also set the "sort_keys" value. if app.debug: settings.setdefault('indent', 4) settings.setdefault('sort_keys', not PY3)
return HTTPResponse( dumps(data, **settings) + "\n", headers=headers, status=200, content_type="application/json", ) |