decodeFromJsonElement

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

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