So something like SampleObject sampleObject = new ...
# android
r
So something like SampleObject sampleObject = new Gson().fromJson(sampleObjJson, SampleObject::class.java)
k
Doesn’t this work for you?
The syntax should be like this mind you:
Copy code
val sampleObject = Gson().fromJson(sampleObjJson, SampeObject::class.java)
r
yes that is the syntax for kotlin but if we want to deserialze in java
it is different
figured it out
Thanks for your reply