title: Display Json formatted input from Flask in python
body: <p>Trying to take a Json  input from user and display it with proper json formatting:</p>
  
  <p>Below is the python code:</p>
  
  <pre><code>@app.route('/')
  def my_form():
      return render_template('my-form.html')
  
  @app.route('/', methods=['POST'])
  def my_form_post():
      text = request.form['text']
      return jsonify(request.form)
  if __name__ == '__main__':
        app.run(host='0.0.0.0')
  </code></pre>
  
  <p>Here is the html code:</p>
  
  <pre><code>&lt;form method="POST"&gt;
      &lt;input name="text"&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the output:
  <a href="https://i.stack.imgur.com/TwP59.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TwP59.jpg" alt="enter image description here"></a></p>
  
  <p>What mistake am I doing here to  get the result on the flask page in proper json format ?</p>
  
  <p>This is the output i'm getting:</p>
  
  <pre><code>text    "{\"a\":1,\"b\":2,\"c\":3}"
  </code></pre>
  
  <p>Desired Op:<br></p>
  
  <pre><code>{
  "a":1,
  "b":2,
  "c":3
  }
  </code></pre>