api / tv.twelvetone.json / JsonArray / unmodifiableArray

unmodifiableArray

fun unmodifiableArray(array: JsonArray): JsonArray

Returns an unmodifiable wrapper for the specified JsonArray. This method allows to provide read-only access to a JsonArray.

The returned JsonArray is backed by the given array and reflects subsequent changes. Attempts to modify the returned JsonArray result in an UnsupportedOperationException.

Parameters

array - the JsonArray for which an unmodifiable JsonArray is to be returned

Return
an unmodifiable view of the specified JsonArray