Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T : Any> decodeFromReader(reader: XmlReader, rootName: QName? = null): T
fun <T : Any> decodeFromReader(deserializer: DeserializationStrategy<T>, reader: XmlReader, rootName: QName? = null): T

Parse an object of the type T out of the reader

Link copied to clipboard
inline fun <T : Any> decodeFromString(str: String, rootName: QName? = null): T
open override fun <T> decodeFromString(deserializer: DeserializationStrategy<T>, string: String): T
fun <T> decodeFromString(deserializer: DeserializationStrategy<T>, string: String, rootName: QName?): T

Parse an object of the type T out of the reader

Link copied to clipboard
inline fun <T : Any> encodeToString(obj: T, prefix: String? = null): String
inline fun <T : Any> encodeToString(obj: T, rootName: QName): String
open override fun <T> encodeToString(serializer: SerializationStrategy<T>, value: T): String
fun <T> encodeToString(serializer: SerializationStrategy<T>, value: T, prefix: String): String
fun <T> encodeToString(serializer: SerializationStrategy<T>, value: T, rootName: QName): String

Transform the object into an XML string. This requires the object to be serializable by the kotlin serialization library (either it has a built-in serializer or it is kotlinx.serialization.Serializable.

Link copied to clipboard
inline fun <T : Any> encodeToWriter(target: XmlWriter, value: T, prefix: String? = null)
inline fun <T : Any> encodeToWriter(target: XmlWriter, value: T, rootName: QName)
fun <T> encodeToWriter(target: XmlWriter, serializer: SerializationStrategy<T>, value: T, prefix: String? = null)
fun <T> encodeToWriter(target: XmlWriter, serializer: SerializationStrategy<T>, value: T, rootName: QName)

Write the object to the given writer

Link copied to clipboard