Builder

Configuration for the xml parser.

Constructors

Link copied to clipboard
constructor(config: XmlConfig)

Properties

Link copied to clipboard

Should polymorphic information be retrieved using SerializersModule configuration. This replaces XmlPolyChildren, but changes serialization where that annotation is not applied. This option will become the default in the future although XmlPolyChildren will retain precedence (when present).

Link copied to clipboard

Default parsing to the optimized generic parser rather than using the platform specific one

Link copied to clipboard
var indent: Int

The indentation level (in spaces) to use. This is derived from indentString. Tabs are counted as 8 characters, everything else as 1. When setting it will update indentString with indent space characters

Link copied to clipboard

The indentation to use. This is passed to the XmlWriter. Note that at this point no validation of the indentation is done, if it is not valid whitespace it will produce unexpected XML.

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

This property determines whether the serialization will collect all used namespaces and emits all namespace attributes on the root tag.

Link copied to clipboard

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 in use.

Link copied to clipboard

This property can be used to disable various checks on the correctness of the serializer descriptions. This should speed up processing, but may give surprising results in the presence of an error.

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

Should namespaces automatically be repaired. This option will be passed on to the XmlWriter

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun fast()

Configure the parser using the latest recommended settings for fast (en/de)coding. Note that this function has no guarantee of stability.

inline fun fast(configurePolicy: DefaultXmlSerializationPolicy.Builder.() -> Unit)

Configure the policy and the config builder with the latest recommended settings and policy. Note that this function has no guarantee of stability.

Link copied to clipboard

Configure the format using the recommended configuration as of version 0.87.0. This configuration is stable.

inline fun fast_0_90_2(configurePolicy: DefaultXmlSerializationPolicy.Builder.() -> Unit)

Configure the format starting with the recommended configuration as of version 0.87.0. This configuration is stable. Note that this defaults to xml 1.1 with (minimal) document type declaration. A document type declaration is required for XML 1.1 (otherwise it reverts to 1.0).

Link copied to clipboard

Configure the parser using the latest recommended settings. Note that this function has no guarantee of stability.

inline fun recommended(configurePolicy: DefaultXmlSerializationPolicy.Builder.() -> Unit)

Configure the policy and the config builder with the latest recommended settings and policy. Note that this function has no guarantee of stability.

Link copied to clipboard

Configure the format using the recommended configuration as of version 0.86.3. This configuration is stable.

Configure the format starting with the recommended configuration as of version 0.86.3. This configuration is stable.

Link copied to clipboard

Configure the format using the recommended configuration as of version 0.87.0. This configuration is stable.

Configure the format starting with the recommended configuration as of version 0.87.0. This configuration is stable.

Link copied to clipboard

Configure the format using the recommended configuration as of version 0.87.0. This configuration is stable.

Configure the format starting with the recommended configuration as of version 0.87.0. This configuration is stable. Note that this defaults to xml 1.1 with (minimal) document type declaration. A document type declaration is required for XML 1.1 (otherwise it reverts to 1.0).