kotlinx.serialization
kotlinx.serialization copied to clipboard
decodeSequentially does not pass SerialDescriptor
What is your use-case and why do you need this feature?
decodeSequentially is the only function of CompositeDecoder that does not have the SerialDescriptor as parameter. I need to dynamically check if the data is sequentially and I need the SerialNames (getElementName) of the SerialDescriptor.
As a workaround I check if the data is sequentially in beginStructure.
Describe the solution you'd like Add SerialDescriptor as parameter to decodeSequentially. It is a breaking change but the api is marked as experimental so it should be fine.
Indeed, adding it can be useful