Represents an instance of a serialization format that can interact with KSerializer and is a supertype of all entry points for a serialization. It does not impose any restrictions on a serialized form or underlying storage, neither it exposes them.
Exception types for
Methods responsible for format-specific encoding and decoding are allowed to throw any subtype of IllegalArgumentException in order to indicate serialization and deserialization errors. It is recommended to throw subtypes of SerializationException for encoder and decoder specific errors and IllegalArgumentException for input and output validation-specific errors.
Not stable for inheritance
SerialFormat interface is not stable for inheritance in 3rd party libraries, as new methods might be added to this interface or contracts of the existing methods can be changed.
It is safe to operate with instances of
SerialFormat and call its methods.