Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « Response »

Méthode flask.wrappers.Response.get_json

Signature de la méthode get_json

def get_json(self, force: 'bool' = False, silent: 'bool' = False) -> 't.Any | None' 

Description

help(Response.get_json)

Parse :attr:`data` as JSON. Useful during testing.

If the mimetype does not indicate JSON
(:mimetype:`application/json`, see :attr:`is_json`), this
returns ``None``.

Unlike :meth:`Request.get_json`, the result is not cached.

:param force: Ignore the mimetype and always try to parse JSON.
:param silent: Silence parsing errors and return ``None``
    instead.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé