Builder

abstract class Builder(var pedantic: Boolean, var autoPolymorphic: Boolean, var encodeDefault: XmlSerializationPolicy.XmlEncodeDefault, var unknownChildHandler: UnknownChildHandler, var typeDiscriminatorName: QName?, var throwOnRepeatedElement: Boolean, var verifyElementOrder: Boolean, var isInlineCollapsedDefault: Boolean, var isStrictAttributeNames: Boolean, var isStrictBoolean: Boolean, var isXmlFloat: Boolean, var isStrictOtherAttributes: Boolean, var formatCache: FormatCache, var defaultPrimitiveOutputKind: OutputKind, var defaultObjectOutputKind: OutputKind)(source)

A configuration builder for the default serialization policy.

Inheritors

Constructors

Link copied to clipboard
protected constructor(pedantic: Boolean, autoPolymorphic: Boolean, encodeDefault: XmlSerializationPolicy.XmlEncodeDefault, unknownChildHandler: UnknownChildHandler, typeDiscriminatorName: QName?, throwOnRepeatedElement: Boolean, verifyElementOrder: Boolean, isInlineCollapsedDefault: Boolean, isStrictAttributeNames: Boolean, isStrictBoolean: Boolean, isXmlFloat: Boolean, isStrictOtherAttributes: Boolean, formatCache: FormatCache, defaultPrimitiveOutputKind: OutputKind, defaultObjectOutputKind: OutputKind)
protected constructor(policy: XmlSerializationPolicy)

Properties

Link copied to clipboard

Rather than using type wrappers use the tag name to distinguish polymorphic types

Link copied to clipboard

Determine whether defaults need to be encoded

Link copied to clipboard

The cache used to speed up mapping for serializer to xml representation.

Link copied to clipboard

Process attribute name reading strictly according to the XML standard, or a name handling that is a bit more lenient

Link copied to clipboard

Parse boolean data according to the requirements of XML, rather than the (very lenient) toBoolean function from the Kotlin standard library.

Link copied to clipboard

Parse float/double data according to the requirements of XML, rather than the toFloat/Float.toString functions from the Kotlin standard library.

Link copied to clipboard

Enable some stricter behaviour

Link copied to clipboard

When a single-value elemement is repeated in the content, will this throw an exception or only retain the final value

Link copied to clipboard

When set, use a type discriminator property

Link copied to clipboard

Function called when an unknown child is encountered. By default it throws an exception, but this function can use its own recovery behaviour

Link copied to clipboard

Verify that element children are in the order required by order annotations (and fail if not correct). Note that attribute order in XML is arbitrary and not meaningful.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard