Switch to flask.jsonify which is clearly superior