Colton Idle
02/09/2022, 2:56 PMdata
model is a model that is unique for each network call.
{
"ok": true,
"data": {
...
}
}
Should I try to use generics or a polymorphic type adapter? So something like
suspend fun callOne(): BaseResponse<ActualOneResponse>
suspend fun callTwo(): BaseResponse<ActualTwoResponse>
or should I use PolymorphicJsonAdapterFactory
and ask my backend to send back down a discriminator/labelKey?