JSONStorage.KeyOrderStrategy

Strategy in which to sort object-type JSON keys when we format/serialise the stored storage to string.

Values

ValueMeaning
passthrough

Order is as JSONValue.toPrettyString formats it.

sorted

Sorted by key.

reverse

Reversely sorted by key.

inGivenOrder

Keys are listed in the order given in a passed string[] array.

Actual keys not present in the array are not included in the output, and keys not existing yet present in the array are added as empty.