xml

fun SerialDescriptor.xml(xmlDescriptor: SerialDescriptor = this, serialQName: QName? = null): XmlSerialDescriptor(source)

Helper function that allows the XML format to use a different descriptor for the given type. This is intended for use with custom serializers implementing XmlSerializer to handle xml serialization specially.

Receiver

The "normal"/default descriptor

Return

A subtype of the serializer that is recognized by the xml format and allows dynamic descriptions dependent on the format.

Parameters

xmlDescriptor

The descriptor to use in case of XML (not overridden by default).

serialQName

The name of the type as if specified by annotation. By default null (no name given)