decodeFromJsonElement

Deserializes the given json element into a value of type T using a deserializer retrieved from reified type parameter.

Throws

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

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