From 63876614b6734e6404f17c9d3d22b71b3f43d158 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 9 Aug 2011 16:16:04 +0200 Subject: [PATCH] Removed second mention of json. This fixes #290 --- docs/api.rst | 6 ------ flask/wrappers.py | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index e657bf6e..6b695bfa 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -119,12 +119,6 @@ Incoming Request Data Libraries that do that are prototype, jQuery and Mochikit and probably some more. - .. attribute:: json - - Contains the parsed body of the JSON request if the mimetype of - the incoming data was `application/json`. This requires Python 2.6 - or an installed version of simplejson. - .. class:: request To access incoming request data, you can use the global `request` diff --git a/flask/wrappers.py b/flask/wrappers.py index 2d3d53f7..aed0a8d0 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -91,7 +91,9 @@ class Request(RequestBase): @cached_property def json(self): """If the mimetype is `application/json` this will contain the - parsed JSON data. + parsed JSON data. Otherwise this will be `None`. + + This requires Python 2.6 or an installed version of simplejson. """ if __debug__: _assert_have_json()