Interface MemberOptionsBase

interface MemberOptionsBase {
    constructor?: Typelike;
    deserializer?: ((json, params) => any);
    emitDefaultValue?: boolean;
    isRequired?: boolean;
    name?: string;
    preserveNull?: boolean;
    serializer?: ((value, params) => any);
}

Hierarchy (view full)

Properties

constructor?: Typelike

Sets the constructor of the property. Optional with ReflectDecorators.

deserializer?: ((json, params) => any)

Custom deserializer for member

Type declaration

emitDefaultValue?: boolean

When set, a default value is emitted if the property is uninitialized/undefined.

isRequired?: boolean

When set, indicates that the member must be present when deserializing.

name?: string

When set, the key on the JSON that should be used instead of the class property name.

preserveNull?: boolean

Whether to preserve null in the JSON output. When false it will not emit nor store the property if its value is null. Default: false.

serializer?: ((value, params) => any)

Custom serialized for member

Type declaration

    • (value, params): any
    • Custom serialized for member

      Parameters

      Returns any