decode

inline fun <T : Any> MediaTypeDecoder.decode(data: Source): T

Decodes binary data into a specific Java/Kotlin type.

The target Java/Kotlin type is deduced by the reified type parameter T.

Return

Instance of T.

Parameters

data

Binary data source.


Decodes a structured Map into a specific Java/Kotlin type.

The target Java/Kotlin type is deduced by the reified type parameter T.

Parameters

data

Structured map to decode.


inline fun <T : Any> TextMediaTypeDecoder.decode(data: String): T

Decodes text into a specific Java/Kotlin type.

Parameters

data

Text data.

type

Target Java/Kotlin type.