Interface SerializableMemberOptions


UML class diagram of SerializableMemberOptions
icon for an interface in the UML class diagram interface



constructor?: Typelike

Sets the constructor of the property. Optional with ReflectDecorators.

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

Type declaration

emitDefaultValue?: boolean

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

index?: string | boolean

Create an index on this attribute. Possible values are true/false or a string for specifying this attribute as part of multiple attributes in an index.

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.

primaryKey?: boolean

Identify this attribute as a primary key

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

Type declaration

unique?: boolean

Identify this attribute as unique