flask.Request.get_json¶
-
Request.
get_json
(force=False, silent=False, cache=True)[source]¶ Parses the incoming JSON request data and returns it. By default this function will return
None
if the mimetype is not application/json but this can be overridden by theforce
parameter. If parsing fails theon_json_loading_failed()
method on the request object will be invoked.Parameters: - force – if set to
True
the mimetype is ignored. - silent – if set to
True
this method will fail silently and returnNone
. - cache – if set to
True
the parsed JSON data is remembered on the request.
- force – if set to