decodeFromString

open override fun <T> decodeFromString(deserializer: DeserializationStrategy<T>, string: String): T(source)

Decode the given string value using the deserializer. It is equivalent to decodeFromReader(deserializer, XmlStreaming.newReader(string)).

Parameters

deserializer

The deserializer to use.

string

The string input


fun <T> decodeFromString(deserializer: DeserializationStrategy<T>, string: String, rootName: QName?): T(source)

Decode the given string value using the deserializer. It is equivalent to decodeFromReader(deserializer, XmlStreaming.newReader(string)).

Parameters

deserializer

The deserializer to use.

string

The text to decode

rootName

The expected name of the root element, if null it will be automatically detected.


inline fun <T> decodeFromString(string: String, rootName: QName?): T(source)

Decode the given string value using the deserializer. It is equivalent to decodeFromReader(deserializer, XmlStreaming.newReader(string)).

Parameters

string

The text to decode

rootName

The expected name of the root element, if null it will be automatically detected.