annotation class Serializer(val forClass: KClass<*>)

Instructs the serialization plugin to turn this class into serializer for specified class forClass. However, it would not be used automatically. To apply it on particular class or property, use Serializable or UseSerializers, or Contextual with runtime registration.

@Serializer(forClass) is experimental and unstable feature that can be changed in future releases. Changes may include additional constraints on classes and objects marked with this annotation, behavioural changes and even serialized shape of the class.


Link copied to clipboard
fun Serializer(forClass: KClass<*>)


Link copied to clipboard
val forClass: KClass<*>