Skip to content
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

Fallback Deserializer for unknown types #115

Open
findusl opened this issue Sep 7, 2023 · 0 comments
Open

Fallback Deserializer for unknown types #115

findusl opened this issue Sep 7, 2023 · 0 comments

Comments

@findusl
Copy link
Owner

findusl commented Sep 7, 2023

If the commands are extended in the future, but the client is not updated, the client might receive a command it cannot recognise. For this purpose the Serialisers should be extended to allow for a fallback "UnknownCommand" value to be used.

Kotlin/kotlinx.serialization#448

Unclear how to make this clean, except by making a separate FallbackSerialiser for each object. Maybe it would be possible to add a different annotation that defines the fallback and read that. Need to check about annotation retention in KMM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant