From de25e98f917ae441d186e8a722a0f40a6c7458f2 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Wed, 4 May 2016 06:46:49 -0700 Subject: [PATCH] minor rewording of get_json documentation for clarity (#1781) --- flask/wrappers.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/flask/wrappers.py b/flask/wrappers.py index 8b1ca251..9d611504 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -123,11 +123,12 @@ class Request(RequestBase): return False def get_json(self, force=False, silent=False, cache=True): - """Parses the incoming JSON request data and returns it. If - parsing fails the :meth:`on_json_loading_failed` method on the - request object will be invoked. By default this function will - only load the json data if the mimetype is :mimetype:`application/json` - but this can be overridden by the `force` parameter. + """Parses the incoming JSON request data and returns it. By default + this function will return ``None`` if the mimetype is not + :mimetype:`application/json` but this can be overridden by the + ``force`` parameter. If parsing fails the + :meth:`on_json_loading_failed` method on the request object will be + invoked. :param force: if set to ``True`` the mimetype is ignored. :param silent: if set to ``True`` this method will fail silently