BaseMapper interface

The base definition of a mapper. Can be used for XML and plain JavaScript objects.

Properties

constraints

Constraints to test the current value against

defaultValue

Default value when one is not explicitly provided

isConstant

Whether or not the current property is a constant

nullable

Whether or not the current property allows mull as a value

readOnly

Whether or not the current property is readonly

required

Whether or not the current property is required

serializedName

The name to use when serializing

type

Type of the mapper

xmlElementName

Name for the xml elements when serializing an array

xmlIsAttribute

Determines if the current property should be serialized as an attribute of the parent xml element

xmlIsMsText

Determines if the current property should be serialized as the inner content of the xml element

xmlIsWrapped

Whether or not the current property should have a wrapping XML element

xmlName

Name for the xml element

xmlNamespace

Xml element namespace

xmlNamespacePrefix

Xml element namespace prefix

Property Details

constraints

Constraints to test the current value against

constraints?: MapperConstraints

Property Value

defaultValue

Default value when one is not explicitly provided

defaultValue?: any

Property Value

any

isConstant

Whether or not the current property is a constant

isConstant?: boolean

Property Value

boolean

nullable

Whether or not the current property allows mull as a value

nullable?: boolean

Property Value

boolean

readOnly

Whether or not the current property is readonly

readOnly?: boolean

Property Value

boolean

required

Whether or not the current property is required

required?: boolean

Property Value

boolean

serializedName

The name to use when serializing

serializedName?: string

Property Value

string

type

Type of the mapper

type: MapperType

Property Value

xmlElementName

Name for the xml elements when serializing an array

xmlElementName?: string

Property Value

string

xmlIsAttribute

Determines if the current property should be serialized as an attribute of the parent xml element

xmlIsAttribute?: boolean

Property Value

boolean

xmlIsMsText

Determines if the current property should be serialized as the inner content of the xml element

xmlIsMsText?: boolean

Property Value

boolean

xmlIsWrapped

Whether or not the current property should have a wrapping XML element

xmlIsWrapped?: boolean

Property Value

boolean

xmlName

Name for the xml element

xmlName?: string

Property Value

string

xmlNamespace

Xml element namespace

xmlNamespace?: string

Property Value

string

xmlNamespacePrefix

Xml element namespace prefix

xmlNamespacePrefix?: string

Property Value

string