<How do you deserialize a object with generic prop...
# stackoverflow
u
How do you deserialize a object with generic property T using Gson in Kotlin? I receive an instance of the following class over the network: data class NetworkCommandModel( var CommandType : NetworkCommandTypeEnum, var CommandPayLoad : T ) With the CommandPayload not being a generic type (but a string or whatever) I could deserialize the object as follows: var command = Gson().fromJson(jsonString, NetworkCommandModel::class.java) How can I do it with the generic type? So far I have found some answers in <a...