retrofit2-kotlinx-serialization-converter
retrofit2-kotlinx-serialization-converter copied to clipboard
Polymorphic serializer Error
When I use "minifyEnabled true" that error message is thrown...
kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for missing class discriminator ('null') JSON input: {"success":true,"message":"Otp sent successfully","data":{"countryCode":"880","mobileNo":" 99999999","type":"New","testOtp":63401}}
how can i fix it?
try @Keep for all models
If you're using a Call like fun fetchSomething(): Call<Something>
, make sure it's not a suspend function