Leonid Startsev
Leonid Startsev
That's indeed true, but I'm afraid it can't be drop-in replacement, as there are several known limitations of `dynamic` decoding (https://kotlin.github.io/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/decode-from-dynamic.html): it can't support non-string Map keys and doesn't work...
I think the root of the problem here is `@Serializable(with = PolymorphicSerializer::class)` on the `BaseClass` itself. See, normally ExtendedClass (de)serializer would delegate to the generated serializer of the BaseClass for...
Even if Polymorphic kind would be selected instead of Contextual, Internal API still would be used due to `buildSerialDescriptor`.
Closing for the reason described in https://github.com/Kotlin/kotlinx.serialization/pull/877#pullrequestreview-441582372
https://github.com/Kotlin/kotlinx.serialization/pull/877#issuecomment-1081826204
Note that current `JsonConfiguration` is useless for creating new Json instances (as it was intended to be used mainly in encoders/decoders), so one still would need to use `JsonBuilder` for...
I think we have some caching by default, we just need to find out lay outs
@Martmists-GH That's a different error, since the exception message and stacktrace are different and there are no wildcard imports. Moreover, it does not look like kotlinx-serialization related. I think you...
I think in your particular case it's easier to just do `substring` on the message. But in general, idea of messages/data addressed to the user may be interesting.
Check out https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#specifying-serializers-for-a-file and also https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#contextual-serialization. These serializers always have higher priority than a `@Serializable(with=...)` on a class and can be configured per file. Does this solve your problem?