api / tv.twelvetone.json / JsonObject / unmodifiableObject

unmodifiableObject

fun unmodifiableObject(object: JsonObject): JsonObject

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

The returned JsonObject is backed by the given object and reflect changes that happen to it. Attempts to modify the returned JsonObject result in an UnsupportedOperationException.

Parameters

object - the JsonObject for which an unmodifiable JsonObject is to be returned

Return
an unmodifiable view of the specified JsonObject