[]
Encodes the specified default value as undefined and skips it during serialization. During deserialization, the undefined value will be replaced with the specified default value.
public static JsonCoder<T> Default<T>(this JsonCoder<T> coder, T defValue)
Type | Name | Description |
---|---|---|
JsonCoder<T> | coder | The current JsonCoder<T> to encode and decode the value. |
T | defValue | A default value. |
Type | Description |
---|---|
JsonCoder<T> | A JsonCoder<T> with the default value handling. |
Name | Description |
---|---|
T | A type of the value. |