getPropertyAs

open override fun <T : Any> getPropertyAs(property: String, type: Class<T>): T?

If this JSON value is a JSON object, gets the value of a given property as an object of a given type. If this JSON value is not a JSON object or if this JSON object has no property with the given name, then this method returns null. If the conversion is not possible, this method returns null.

Return

an object of class <T> representing the property named property of this JSON object

Parameters

property

The name of the property of this JSON object to convert

type

The Class object associated to the <T> type

<T>

The Java or POJO type to convert the property of this JSON object to