. Error = “Not enough information to infer type variable T”. On iOS we have Decodable which allows these kind of generic implementation.
Was wondering if this is allowed on kotlin or this can’t be achieved and an actual type in place if generic T is required?
r
rnett
03/22/2021, 10:47 PM
If you can make
getJsonFromRouter
inline, you can use
reified
on
T
. Otherwise I'd probably take the serializer as a parameter or take the
KType
(but you lose type safety with
KType
).
s
sushma nayak
03/23/2021, 5:35 AM
Thanks!! Using the serializer as a parameter as I cant use inline