I've got an endpoint that I know is liable to change on the server side in a way that isn't backwards compatible for mobile clients. I have limited ability to influence the API.
I'd like to have
@Serializable data class MyDataClass(val inner: MyUnreliableDataClass?)
Where kotlinx.serialization will just insert
null
as the value for
inner
if the deserialization fails because the server-side json schema changed.
Is there an easy way to define this kind of a serializer?