XmlSerializationStrategy

SerializationStrategy sub-interface that supports special serialization for the XML format. The format will call serializeXML rather than serialize allowing for special functionality.

Note that if the serialization differs for different formats you must use an XML specific descriptor by using the SerialDescriptor.xml extension function that allows for this special casing. This is a bit of a hack to allow for it to be visible across wrapping descriptors.

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun serialize(encoder: Encoder, value: T)
Link copied to clipboard
abstract fun serializeXML(encoder: Encoder, output: XmlWriter, value: T, isValueChild: Boolean = false)

Deserialize the XML using the implementation. This is intended to be using the XmlReader for special purposes. The format will attempt to shield the input to avoid erroneous parsing.