Browse Source

Removed second mention of json. This fixes #290

pull/302/head
Armin Ronacher 14 years ago
parent
commit
63876614b6
  1. 6
      docs/api.rst
  2. 4
      flask/wrappers.py

6
docs/api.rst

@ -119,12 +119,6 @@ Incoming Request Data
Libraries that do that are prototype, jQuery and Mochikit and Libraries that do that are prototype, jQuery and Mochikit and
probably some more. 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 .. class:: request
To access incoming request data, you can use the global `request` To access incoming request data, you can use the global `request`

4
flask/wrappers.py

@ -91,7 +91,9 @@ class Request(RequestBase):
@cached_property @cached_property
def json(self): def json(self):
"""If the mimetype is `application/json` this will contain the """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__: if __debug__:
_assert_have_json() _assert_have_json()

Loading…
Cancel
Save