convert string json response gson in android code example
Example 1: kotlin jsonobject from string
val data = JSONObject("""{"name":"test name", "age":25}""")
Example 2: How To Convert Json To Java Object
I add GSON dependency in my POM --> It’s a json parser. That is
used to convert from java object to json and from json to java
object
SERIALIZATION: CONVERT JAVA OBJECT -> JSON
DE-SERIALIZATION: CONVERT JSON -> JAVA OBJECT