I believe Flask set mimetype to HTML by default.  Since you're not using flask-restful which sets it to json by default, likely need to set it manually, perhaps by calling a response object creation method instead of json.dumps.  See http://flask.pocoo.org/docs/api/#flask.Response