JSONStorage.save

Saves the JSON storage to disk. Formatting is done as specified by the passed KeyOrderStrategy argument.

Merely leverages serialiseInto and writeln.

struct JSONStorage
@safe
void
save
(
const string filename
,
const string[] givenOrder = string[].init
)

Parameters

strategy

Key order strategy in which to sort object-type JSON keys.

filename string

Filename of the file to save to.

givenOrder string[]

The order in which object-type keys should be listed in the output file. Non-existent keys are represented as empty. Not specified keys are omitted.

Meta