Open
Description
What is your use-case and why do you need this feature?
There is an extension for encoding structures (encodeStructure
) but no extension for encoding collection which would be useful for custom serializers.
Describe the solution you'd like
I'd like for an extension to be added. It's signature would be:
public inline fun Encoder.encodeCollection(
descriptor: SerialDescriptor,
collectionSize: Int,
block: CompositeEncoder.() -> Unit
)