MCPcopy
hub / github.com/pallets/werkzeug / json

Method json

src/werkzeug/wrappers/request.py:545–560  ·  view source on GitHub ↗

The parsed JSON data if :attr:`mimetype` indicates JSON (:mimetype:`application/json`, see :attr:`is_json`). Calls :meth:`get_json` with default arguments. If the request content type is not ``application/json``, this will raise a 415 Unsupported Media Type error.

(self)

Source from the content-addressed store, hash-verified

543
544 @property
545 def json(self) -> t.Any:
546 """The parsed JSON data if :attr:`mimetype` indicates JSON
547 (:mimetype:`application/json`, see :attr:`is_json`).
548
549 Calls :meth:`get_json` with default arguments.
550
551 If the request content type is not ``application/json``, this
552 will raise a 415 Unsupported Media Type error.
553
554 .. versionchanged:: 2.3
555 Raise a 415 error instead of 400.
556
557 .. versionchanged:: 2.1
558 Raise a 400 error if the content type is incorrect.
559 """
560 return self.get_json()
561
562 # Cached values for ``(silent=False, silent=True)``. Initialized
563 # with sentinel values.

Callers 1

initPinBoxFunction · 0.45

Calls 1

get_jsonMethod · 0.95

Tested by

no test coverage detected