forked from orbit-oss/flask
docs: :mimetype:application/json
This commit is contained in:
parent
663802e976
commit
d4b9b9854c
6 changed files with 9 additions and 9 deletions
|
|
@ -200,7 +200,7 @@ def htmlsafe_dump(obj, fp, **kwargs):
|
|||
|
||||
def jsonify(*args, **kwargs):
|
||||
"""Creates a :class:`~flask.Response` with the JSON representation of
|
||||
the given arguments with an `application/json` mimetype. The arguments
|
||||
the given arguments with an :mimetype:`application/json` mimetype. The arguments
|
||||
to this function are the same as to the :class:`dict` constructor.
|
||||
|
||||
Example usage::
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class Request(RequestBase):
|
|||
|
||||
@property
|
||||
def json(self):
|
||||
"""If the mimetype is `application/json` this will contain the
|
||||
"""If the mimetype is :mimetype:`application/json` this will contain the
|
||||
parsed JSON data. Otherwise this will be ``None``.
|
||||
|
||||
The :meth:`get_json` method should be used instead.
|
||||
|
|
@ -112,7 +112,7 @@ class Request(RequestBase):
|
|||
def is_json(self):
|
||||
"""Indicates if this request is JSON or not. By default a request
|
||||
is considered to include JSON data if the mimetype is
|
||||
``application/json`` or ``application/*+json``.
|
||||
:mimetype:`application/json` or :mimetype:`application/*+json`.
|
||||
|
||||
.. versionadded:: 0.11
|
||||
"""
|
||||
|
|
@ -127,7 +127,7 @@ class Request(RequestBase):
|
|||
"""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 ``application/json``
|
||||
only load the json data if the mimetype is :mimetype:`application/json`
|
||||
but this can be overridden by the `force` parameter.
|
||||
|
||||
:param force: if set to ``True`` the mimetype is ignored.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue