register

inline fun <T : Any> register(typeName: String)

Registers T, which has to be @Serializable, under typeName.


inline fun <T : Any> register()

Registers T, which has to be @Serializable, under the name its DynamicallyMappable declares. The overloads taking a name ignore the annotation.


fun <T : Any> register(kClass: KClass<T>, serializer: KSerializer<T>, typeName: String)

Registers kClass with serializer, for a caller that found the class rather than named it.

Throws

INVALID_ARGUMENT where the name is blank, the name is taken by another class, the class is registered under another name, or another client registered it on another DynamicWriteStrategy.


fun register(kClass: KClass<*>, typeName: String)

Registers kClass, which has to be @Serializable, with the serializer its type resolves to.


fun register(kClass: KClass<*>)

Registers kClass, which has to be @Serializable, under the name its DynamicallyMappable declares.