json2object icon indicating copy to clipboard operation
json2object copied to clipboard

JsonWriter(ignoreNullOptionals) is not documented

Open EliteMasterEric opened this issue 2 years ago • 0 comments

The ignoreNullOptionals argument to the JsonWriter is currently completely undocumented. This option requires passing true as the argument to the JsonWriter (not the write call itself), and allows you to mark nullable values as @:optional, which excludes the value from the serialized output if it is null.

    var writer = new json2object.JsonWriter<InputType>(true);
    return writer.write(input, pretty ? '  ' : null);

EliteMasterEric avatar Oct 30 '23 06:10 EliteMasterEric