Hey guys,
what are good approaches to backward-compatible serialization with Kotlin Serialization?
The server serializes data for / deserializes data from iOS and Android clients. But different versions of the clients can have different data model versions, so the server needs to change the serialization depending on what client it is talking to.
Some ideas from on top of my mind, although I don't know if possible with the library:
• Dynamically use different serializers depending on the client's "model version" - maybe even per class (how would I do that?).
• Write own serializers for changed model classes and generate different output depending on client's "model version" (how would I get access to some context/request from within a serializer?)
• Have a large number of completely different model classes in the backend with their own serializers each - and that for each evolution of the model.