decodeFromJsonElement

inline fun <T> Json.decodeFromJsonElement(json: JsonElement): T

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

Throws

if the given JSON string is malformed or cannot be deserialized to the value of type T.