I want to create POJO class for Kotlin, as we know that www.jsonschema2pojo.org converts JSON to POJO so we can use it with gson.
Anyone know how to create Gson POJO for
data class ModelUser(val imagePath: String,val userName: String)
Unbelievable Right! Its as simple as that. Just use data
keyword before class
to create Data class in Kotlin.
Data class provides you with everything, getters, setters, hashCode, toString and equals functions. So all you have to do is create an instance and start using the functions.