Skip to main content

load

Deserialize data as JSON read from a file.

def load(
fp: t.IO[t.AnyStr],
kwargs: t.Any
) - > any

Deserialize data as JSON read from a file. If flask.current_app is available, it will use its app.json.load() method, otherwise it will use json.load.

Parameters

NameTypeDescription
fpt.IO[t.AnyStr]A file-like object opened for reading text or UTF-8 bytes containing the JSON document.
kwargst.AnyAdditional keyword arguments passed to the underlying JSON provider's load implementation.

Returns

TypeDescription
anyThe deserialized Python object representation of the JSON data.