`decodeElementIndex` indeed produces element index...
# serialization
s
decodeElementIndex
indeed produces element index. You need to switch over it and then select proper property to decode
a
Could you show a tiny example please? I've tried a lot of different things since there is no documentation so far, but did not manage to make it work.
I need to read char an trying to do it with
val key = decodeCharElement(descriptor, 0)
but it throws error
s
Hm, probably that part in keep should be covered more in details
a
Oh, I forgot to look at keep. I tried to use project documentation.
s
There’s an old debug branch
sourcegen
that contains test data manually generated and committed to the repo. It has similar structure to what the plugin produces: https://github.com/Kotlin/kotlinx.serialization/blob/refactoring_sourcegen/integration-tests/test-data-sourcegen/src/SimpleData.kt#L61
a
Thanks for example. But it seems it is impossible to use this solution in real life, it is too complicated.