mitsuhiko/flask — pull request #1209 by nickretallack (2014-10-20 08:25:33+00:00)
Title: Handle a single unusual argument in jsonify

I ran into this issue today, googled it, and found [someone else having the same issue](http://stackoverflow.com/questions/20668883/flask-jsonify-object-is-not-iterable).

If you're using the JSON Encoder in Overholt, you may notice that passing one of your models to jsonify does not work. It says "object is not iterable", even though your custom json encoder will turn it into an iterable in a moment. This is because Flask is trying to make it into a dict before that can happen.

This patch fixes this case. Also it allows you to return other legitimate singular json values such as integers and strings. Hopefully this doesn't raise any security issues. If it does, someone else may wish to handle this more carefully.