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 encoded bytes containing the JSON document
kwargst.AnyAdditional keyword arguments passed to the underlying JSON provider or standard library load implementation

Returns

TypeDescription
AnyThe deserialized Python object representation of the JSON data