corda / net.corda.core.serialization / CheckpointCustomSerializer


interface CheckpointCustomSerializer<OBJ, PROXY>

Allows CorDapps to provide custom serializers for classes that do not serialize successfully during a checkpoint. In this case, a proxy serializer can be written that implements this interface whose purpose is to move between unserializable types and an intermediate representation.

NOTE: Only implement this interface if you have a class that triggers an error during normal checkpoint serialization/deserialization.



Should facilitate the conversion of the proxy object into a new instance of the unserializable type

abstract fun fromProxy(proxy: PROXY): OBJ


Should facilitate the conversion of the third party object into the serializable local class specified by PROXY

abstract fun toProxy(obj: OBJ): PROXY