Package-level declarations
Types
Opaque caching class that allows for caching format related data (to speed up reuse). This is intended to be stored on the config, thus reused through multiple serializations. Note that this requires the serialName attribute of SerialDescriptor instances to be unique.
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.
Interface for format caches that support being delegated to.
The FormatCache caches the calculations needed to determine the correct format for a specific serializable tree. There are 3 options provided by default:
This class is still here to stop breaking functionality.
Helper class that collates information used in matching tags with types.
Native implementation of a format cache using threadLocals. Note that this uses a fifo queue of caches (up to capacity count) and it will evict the oldest element (independent of usage)
Class that provides access to XML parsing and serialization for the Kotlin Serialization system. In most cases the companion functions would be used. Creating an object explicitly however allows for the serialization to be configured.
Require this property to be serialized after other (sibling) properties. Together XmlBefore and XmlAfter define a partial order over the properties. Using this annotation may cause values to be serialized as elements rather than attributes where not explicitly specified as attributes. If there is a conflict between serialization type (attribute/element) this takes precendence over this attribute. The names are the serialNames of the properties being serialized (not XML names).
Require this property to be serialized before other (sibling) properties. Together XmlBefore and XmlAfter define a partial order over the properties. Using this annotation may cause values to be serialized as elements rather than attributes where not explicitly specified as attributes. If there is a conflict between serialization type (attribute/element) this takes precendence over this attribute. The names are the serialNames of the properties being serialized (not XML names).
Specify additional information about child values in collections. This is only used for primitives, not for classes that have their own independent name. The outer tag name is determined regularly.
Allow a property to be omitted with a default serialized string. This annotation primarily supports older versions of the framework that do not support default attribute values. The default value will not be written out if matched.
Force a property that could be an attribute to be an element. Note that default behaviour requires this annotation to be absent.
Annotation to mark the value as an ID attribute. This implies that the element is an attribute. This will allow the serializer to enforce uniqueness.
Determine whether whitespace should be ignored or preserved for the tag.
Specify the xml name used for the key attribute/tag of a map.
Dual use annotation that both forces explicit map entry wrappers and specifies the tag name used. The default is to elude the wrappers in the case that data does not contain an attribute with the name of the key.
Annotation allowing to specify namespaces specifications to be generated upon the element. As multiple annotations are not supported by the plugin this uses a single string. Each declaration is of the form (prefix)=(namespace). To specify the default namespace it is valid to omit the equals sign.
This annotation allows handling wildcard attributes. It should be specified on a Map<QName, String> to store unsupported attributes. The key is preferred to be a QName, alternatively it must convert to String (this could be "prefix:localName"). The value must be a String type. Note that if the key runtime type is a QName the value is directly used as attribute name without using the key serializer.
Indicate the valid polymorphic children for this element. This is a legacy annotation supporting polymorphic (de)serialization without modules.
Policies allow for customizing the behaviour of the xml serialization
Specify more detailed name information than can be provided by kotlinx.serialization.SerialName. The default value is different from an empty value, in that it will result in a default behaviour.
Force a property to be content of the tag (for the object containing the property). This is both for text content (polymorphic including a primitive), but if the type is a list of tag-like types (Node, Element, CompactFragment) it will also allow mixed content of tags not supported by the base type. Strings will be serialized/deserialized as (tag soup) string content without wrapper.
Properties
Accessor that reads the declared namespaces out of an XmlNamespaceDeclSpecs instance.