decodeFromJsonElement

fun <T> decodeFromJsonElement(deserializer: <Error class: unknown class><T>, element: JsonElement): T(source)

Deserializes the given element into a value of type T using the given deserializer.

Throws

SerializationException

if the given JSON element is not a valid JSON input for the type T

IllegalArgumentException

if the decoded input cannot be represented as a valid instance of type T