getValueAsListOf

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

Gets this JSON value as a list of elements of a given type. If the conversion is not possible (either the JSON value is not a list or one of its elements can't be converted to the given type), this method returns null.

Return

a List of objects of class <T> representing this JSON list

Parameters

type

The Class object associated to the <T> type

<T>

The Java or POJO type to convert the elements of this JSON list to