Hey, I don't know if this is the right flask-ish way to do this, but it would great to have a way to set the JSONEncoder to allow for non-dict object types. This seemed like the easiest way, but I didn't see a good way to fit this into the existing config.
enable setting the json_encoder
This solution is not thread safe unfortunately. If you really need a custom json encoder I recommend writing your own jsonify function instead. It does not take many lines of code and its easier to customize then. I was briefly thinking about adding a setting to the application object that would control that, but the downside is that it then would only affect jsonify and not the json.loads etc. functions.
I raelly think this should be solved individually for the applications. At least unless someone has a clever and nice solution for that :)