Interface SerializableArrayMemberOptions

interface SerializableArrayMemberOptions {
    constructor?: Typelike;
    deserializer?: ((json: any, params: CustomDeserializerParams) => any);
    dimensions?: number;
    emitDefaultValue?: boolean;
    isRequired?: boolean;
    name?: string;
    numberType?: NumberType;
    preserveNull?: boolean;
    rdf?: {
        deserializer?: ((thing: Thing, targetObject?: any, options?: MemberDeserializerOptions) => any);
        serializer?: false | ((value: any[], object?: any, options?: MemberSerializerOptions) => Partial<Quad_Object[] | Thing>);
    } & RDFSerializerOptions;
    serializer?: ((value: any, params: CustomSerializerParams) => any);
}

Hierarchy (view full)

Properties

constructor?: Typelike

Sets the constructor of the property. Optional with ReflectDecorators.

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

Custom deserializer for member

dimensions?: number

Sets array dimensions (e.g. 1 for 'number[]' or 2 for 'number[][]'). Defaults to 1.

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.

numberType?: NumberType

Experimental number type

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.

rdf?: {
    deserializer?: ((thing: Thing, targetObject?: any, options?: MemberDeserializerOptions) => any);
    serializer?: false | ((value: any[], object?: any, options?: MemberSerializerOptions) => Partial<Quad_Object[] | Thing>);
} & RDFSerializerOptions

Resource Description Framework serialization options

Type declaration

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

Custom serialized for member