Leonid Startsev

Results 510 comments of Leonid Startsev

There's an easy workaround, the goal is to get rid of concrete property in parent class: Change ```kotlin @Serializable sealed class TypedSealedClass(val a: T) { @Serializable data class Child(val y:...

Do you have any other dependencies that may refer to an older version of kotlinx-serialization? See discussion here: #2018

Actually, their implementation is very different, because the string is decoded/encoded one-by-one token, while JsonElement is encoded via an internal map structure. That's also the source of the bug —...

So you're telling about the case where we provide a custom serializer with CONTEXTUAL descriptor that sometimes calls plain `encodeString()`? This is not quite right according to serial kinds contract...

I see, top-level `ContextualSerializer` should also be considered

Hm, it seems that it should work without additional handling, because first contextual serializer resolves actual serializer, and only after the `encodeSerializableValue` with `needTopLevelTag` is called. But it's still possible...

Thanks for the reproducer! We'll look into that

I think promising approach to solve this issue is to allow to use `ByteString` on types, too, so one could write `Map` **UPD**: But it seems that currently, serial info...

I'm not sure this is a good idea to change the behavior of a stable function in such a significant way. Also, documentation for `SerializersModule.serializer(type: KType)` is correct: `Attempts to...