abstract fun <T : Any> mapTo(type: Class<T>): T
abstract fun <T : Any> mapTo(type: TypeReference<T>): T
Decodes and returns the current value as the specified type.
type
type - the type to decode the value to
Return the decoded value