MissingFieldException
class MissingFieldException(missingFields: List<String>, message: String?, cause: Throwable?) : SerializationException
Thrown when KSerializer did not receive a non-optional property from CompositeDecoder and CompositeDecoder.decodeElementIndex had already returned CompositeDecoder.DECODE_DONE.
MissingFieldException is thrown on missing field from all auto-generated serializers and it is recommended to throw this exception from user-defined serializers.
See also
Constructors
Link copied to clipboard
Creates an instance of MissingFieldException for the given missingFields and serialName of the corresponding serializer.
Creates an instance of MissingFieldException for the given missingField and serialName of the corresponding serializer.