title: Minified JSON in flask's jsonify()
body: <p>Flask offers the convenient <code>jsonify()</code> function, which returns a JSON object from Python variables:</p>
  
  <pre><code>from flask import Flask, jsonify
  app = Flask(__name__)
  
  @app.route("/")
  def json_hello():
      return jsonify({x:x*x for x in range(5)}), 200
  
  if __name__ == "__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>Which returns:</p>
  
  <pre><code>{
    "0": 0, 
    "1": 1, 
    "2": 4, 
    "3": 9, 
    "4": 16
  }
  </code></pre>
  
  <p>(PS - note the conversion from int to string to comply with JSON).</p>
  
  <p>This indented format is wasteful for long outputs, and I prefer the minified version:</p>
  
  <pre><code>{"1": 1, "0": 0, "3": 9, "2": 4, "4": 16}
  </code></pre>
  
  <p><strong>How can I get the JSON in minified version from Flask's <code>jsonify()</code>?</strong></p>