copy

inline fun <T : Any> copy(value: T?): T?

Creates a deep copy of value.

Throws

if no serializer is registered for the type

if the creation of a serializer was prevented by the security manager


fun <T : Any> copy(type: KType, value: T?): T?

Creates a deep copy of value of the type T (type).

Throws

if no copier is registered for the type

if the creation of a copier was prevented by the security manager