-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed type discriminator value for custom serializer that uses encodeJsonElement
#2628
Conversation
…eJsonElement` Fixes #2451
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Did you check that if doesn't fix all related issues?
override val descriptor: SerialDescriptor = | ||
buildClassSerialDescriptor("VImpl") { | ||
element("a", String.serializer().descriptor) | ||
element("b", Int.serializer().descriptor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no b
in VImpl though
formats/json/commonMain/src/kotlinx/serialization/json/internal/Polymorphic.kt
Outdated
Show resolved
Hide resolved
formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonEncoder.kt
Outdated
Show resolved
Hide resolved
…l/Polymorphic.kt Co-authored-by: Leonid Startsev <[email protected]>
formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonEncoder.kt
Outdated
Show resolved
Hide resolved
…l/TreeJsonEncoder.kt Co-authored-by: Leonid Startsev <[email protected]>
Unfortunately, no, other issues concern sealed classes |
Fixes #2451