Skip to main content

loads

Deserialize data as JSON.

If :data:~flask.current_app is available, it will use its :meth:app.json.loads() < flask.json.provider.JSONProvider.loads > method, otherwise it will use :func:json.loads.

def loads(
s: str | bytes,
kwargs: Any
) - > Any

Deserialize data as JSON. If current_app is available, it will use its app.json.loads() method, otherwise it will use json.loads.

Parameters

NameTypeDescription
s`strbytes`
kwargsAnyAdditional keyword arguments passed to the underlying JSON provider's loads implementation.

Returns

TypeDescription
AnyThe Python object representation of the JSON data, such as a dictionary, list, or scalar value.