MissingFieldException
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.
MissingFieldException is constructed from the following properties:
missingFields -- fields that were required for the deserialization but have not been found. They are always non-empty and their names match the corresponding names in SerialDescriptor.elementNames
Optional
serialName
-- serial name of the enclosing class that failed to get deserialized. Matches the corresponding SerialDescriptor.serialName.
See also
Constructors
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.