XmlSerialDescriptor

Serial Descriptor delegate that supports special casing by the XML format. This means that the descriptor can be different for non-xml and xml serialization. (Used by the QName serializer).

This descriptor is internal as implementation is brittle. If you want an instance use SerialDescriptor.xml.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val elementsCount: Int
Link copied to clipboard
open val isInline: Boolean
Link copied to clipboard
Link copied to clipboard
abstract val kind: SerialKind
Link copied to clipboard
abstract val serialName: String
Link copied to clipboard
open val serialQName: QName?
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun getElementAnnotations(index: Int): List<Annotation>
Link copied to clipboard
Link copied to clipboard
abstract fun getElementIndex(name: String): Int
Link copied to clipboard
abstract fun getElementName(index: Int): String
Link copied to clipboard
abstract fun isElementOptional(index: Int): Boolean
Link copied to clipboard
fun SerialDescriptor.xml(xmlDescriptor: SerialDescriptor = this, serialQName: QName? = null): XmlSerialDescriptor

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.