0

I have:

app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False

and the docs. say that even by default is False.

However, my output is still pretty:

{
  "p": {
    "e": {
      "n": {
        "c": "something..."
      }
    }
  }
}
Nikk
  • 7,384
  • 8
  • 44
  • 90
  • 2
    Are you running this with `FLASK_ENV=development`? I find this still pretty prints, regardless of the `JSONIFY_PRETTYPRINT_REGULAR` setting. However if you execute with just `flask run` (production mode) pretty printing is off, unless that variables is set to `True`. – v25 May 28 '20 at 11:29
  • @v25 I am using `Gunicorn + Nginx`. I haven't set anything explicitly to `development` mode except for `app.debug = True`. – Nikk May 28 '20 at 11:39
  • The documentation states that if app.debug = True, it will still pretty print. Try by changing it to app.debug = False. – chess_madridista Mar 11 '22 at 11:44

0 Answers0