encoders
Generates and registers encoders for a set of types, including their sealed subclasses, with a given JSON serializer.
Return
A ValueEncoderRegistry populated with the generated encoders for the provided types and their subclasses.
Parameters
A set of Kotlin classes for which encoders are generated. The classes may include sealed classes.
The JSON configuration to be used for serialization. Defaults to defaultJson.
Generates encoders for a given class and its optional subclasses using the specified JSON configuration.
Return
A list of pairs, where each pair consists of a KClass and its corresponding ValueEncoder.
Parameters
The main Kotlin class for which an encoder is generated. This class must be serializable.
A set of subclasses of the specified class for which the same encoder is generated. Defaults to an empty set.
The JSON configuration to be used for serialization and deserialization. Defaults to defaultJson.