def _padded_jsonify(callback, *args, **kwargs): content = str(callback) + '(' + json.dumps(dict(*args, **kwargs)) + ')' return app.response_class(content, mimetype='application/json')
def _regular_jsonify(o): content = json.dumps(o) return app.response_class(content, mimetype='application/json')