encode* methods have
serialDescriptor parameters with a strict semantics and constraints:
descriptoris always the same as one used in Encoder.beginStructure. While this parameter may seem redundant, it is required for efficient serialization process to avoid excessive field spilling. If you are writing your own format, you can safely ignore this parameter and use one used in
indexof the element being encoded. This element at this index in the descriptor should be associated with the one being written.
The symmetric interface for the deserialization process is CompositeDecoder.
Not stable for inheritance
CompositeEncoder 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.
Denotes the end of the structure associated with current encoder. For example, composite encoder of JSON format will write a closing bracket in the underlying input and reduce the number of nesting for pretty printing.
Whether the format should encode values that are equal to the default values. This method is used by plugin-generated serializers for properties with default values: