##源码 @property defjson(self): """This will contain the parsed JSON data if the mimetype indicates JSON (:mimetype:`application/json`, see :meth:`is_json`), otherwise it will be ``None``. """ return self.get_json() def_get_data_for_json(self, cache): return self.get_data(cache=cache) defget_json(self, force=False, silent=False, cache=True): """Parse and return the data as JSON. If the mimetype does not indicate JSON (:mimetype:`application/json`, see :meth:`is_json`), this returns ``None`` unless ``force`` is true. If parsing fails, :meth:`on_json_loading_failed` is called and its return value is used as the return value. :param force: Ignore the mimetype and always try to parse JSON. :param silent: Silence parsing errors and return ``None`` instead. :param cache: Store the parsed JSON to return for subsequent calls. """