Pass user built json encoder into Flask's jsonify
You can custom the json encoder of Flask app with app.json_encoder = JSON_Improved
. JSON_Improved
inherit from flask.json.JSONEncoder
class JSON_Improved(JSONEncoder): pass
There is a Flask Snippets about it in https://web.archive.org/web/20190128005233/http://flask.pocoo.org/snippets/119