load

fnbool load(out var obj, const string fileName, out Json5Error err) @safe

Load a JSON5 file from disk into obj.

Returns

true on success; false and populates err on failure.

Examples

import std.file : tempDir; import std.path : buildPath;
ddn.data.json5.Json5Error e; var v;
auto path = buildPath(tempDir, "sample.json5");
// assume file exists with valid JSON5
assert(ddn.data.json5.load(v, path, e));