getValueAs

open override fun <T : Any> getValueAs(type: Class<T>): T?

Gets this JSON value as an object of a given type. If the conversion is not possible, this method returns null.

Return

an object of class <T> representing this JSON value

Parameters

type

The Class object associated to the <T> type

<T>

The Java or POJO type to convert this JSON value to