Skip to content

Add extension for encoding collections #1748

Open
@ansman

Description

@ansman

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
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions