DefaultXmlSerializationPolicy
Default implementation of a serialization policy that provides a behaviour that attempts to create an XML format that resembles what would be created manually in line with XML's design.
Types
A configuration builder for the default serialization policy.
Properties
Should polymorphic information be retrieved using kotlinx.serialization.modules.SerializersModule configuration. This replaces
The default output kind used for objects (including Unit). By default this is as element. Note that objects by default do not have elements.
The default output kind used for (effective) primitives (inline values are elided). By default this is as attribute.
Determine whether defaults need to be encoded
Determines whether inline classes are merged with their content. Note that inline classes may still determine the tag name used for the data even if the actual contents come from the child content.
Process attribute name reading strictly according to the XML standard, or a name handling that is a bit more lenient
Parse boolean data according to the requirements of XML, rather than the (very lenient) toBoolean function from the Kotlin standard library.
Serialize float/double data according to the requirements of XML, rather than the toFloat/Float.toString/toDouble/Double.toString function from the Kotlin standard library.
When a single-value elemement is repeated in the content, will this throw an exception or only retain the final value
When set, use a type discriminator property
A function that is called when an unknown child is found. By default an exception is thrown
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
Determine the delimiters to use to separate attributes. When writing will always write the first element.
Create a builder for this policy. This function allows subclasses to have their own configuration.
Create a copy of this configuration with the changes specified through the config parameter.
Determine namespace prefixes to make sure are set upon the tag.
Allows for recovering from unknown content. The implementation must either throw an exception or consume the content (parse it completely). It can allow recovery by returning a list of data that should be recovered (this can allow further parsing of the data or return final values).
Determines whether inline classes are merged with their content. Note that inline classes may still determine the tag name used for the data even if the actual contents come from the child content. The actual name used is ultimately determined by the policy.
Determine whether the key attribute should be collapsed into the value tag rather than the value being nested in a container for the element.
Determine the name to use for the map element (only used when a map entry is wrapped)
Determine the name of map keys for a given map type
Determine the name of the values for a given map type
Determine the delimiters to use to separate primitive/textual list elements when use inside an element. When writing will always write the first element.
