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 |
default |
Default value when one is not explicitly provided |
is |
Whether or not the current property is a constant |
nullable | Whether or not the current property allows mull as a value |
read |
Whether or not the current property is readonly |
required | Whether or not the current property is required |
serialized |
The name to use when serializing |
type | Type of the mapper |
xml |
Name for the xml elements when serializing an array |
xml |
Determines if the current property should be serialized as an attribute of the parent xml element |
xml |
Determines if the current property should be serialized as the inner content of the xml element |
xml |
Whether or not the current property should have a wrapping XML element |
xml |
Name for the xml element |
xml |
Xml element namespace |
xml |
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
MapperType
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