title: How to implement custom json formatter in Python Flask that rounds floats?
body: <p>Is it possible, in a simple way, to make jsonify format floats to one decimal point? </p>
  
  <p>Here is a simple example. How can I add custom json encoder to this:</p>
  
  <pre><code>from flask import Flask, jsonify
  from flask.ext.restful import Api, Resource
  
  app = Flask(__name__)
  api = Api(app)
  
  class Test(Resource):
      def get(self):
          return jsonify({'data': [.444, .456]});
  
  api.add_resource(Test, '/')
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>So that the output would be:</p>
  
  <pre><code>{
    "data": [
      0.4, 
      0.5
    ]
  }
  </code></pre>