Skip to main content

load

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.

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

Deserialize data as JSON read from a file. If 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 opened for reading text or UTF-8 bytes.
kwargst.AnyArguments passed to the load implementation.

Returns

TypeDescription
t.AnyThe deserialized JSON data.