JSONStorage.load

Loads JSON from disk.

In the case where the file doesn't exist or is otherwise invalid, then JSONValue is initialised to null (by way of JSONStorage.reset).

struct JSONStorage
@safe
void
load
(
const string filename
)

Parameters

filename string

Filename of file to read from.

Throws

Whatever readText and/or parseJSON throws.

lu.common.FileTypeMismatchException if the filename exists but is not a file.

Meta