flask-jsonschema
flask-jsonschema copied to clipboard
Should use request.get_json(silent=True)
On line 59, I think it would be better to use:
request.get_json(silent=True)
instead of:
request.json
Then you won't get those The browser (or proxy) sent a request that this server could not understand
errors.
.json
is now deprecated and raises a warning. See http://flask.pocoo.org/docs/0.11/changelog/:
Deprecated request.json in favour of request.get_json().
I find that if I use
request.get_json(silent=True)
I will get None
, but if I use
request.get_json()
I will get the right data.