ClassSerialDescriptorBuilder
Builder for SerialDescriptor for user-defined serializers.
Both explicit builder functions and implicit (using reified type-parameters) are present and are equivalent. For example, element<Int?>("nullableIntField")
is indistinguishable from element("nullableIntField", IntSerializer.descriptor.nullable)
and from element("nullableIntField", descriptor<Int?>)
.
Please refer to SerialDescriptor builder function for a complete example.
Functions
Add an element with a given name, descriptor, type annotations and optionality the resulting descriptor.
Properties
Indicates that serializer associated with the current serial descriptor support nullable types, meaning that it should declare nullable type in its KSerializer type parameter and handle nulls during encoding and decoding.
Extensions
A reified version of element function that extract descriptor using serializer<T>().descriptor
call with all the restrictions of serializer<T>().descriptor
.