setElementType

inline fun <T, E> Json.setElementType(fieldName: String)

Sets the elements in a collection of type T to type E. When the element type is known, the class for each element in the collection does not need to be written unless different from the element type.