I need to convert a JSONObject to a Location object using gson libraries for an android project of mine. I\'m not sure on how to do this. Can anyone help me with this. Thank
For kotlin
val objType = object : TypeToken() { }.getType() var myclassObj = gson.fromJson(value,objType)
or
val objectResponse = Gson().fromJson(Gson().toJson(resp), MyClass::class.java)