Android How to read Gson object in android?

Create a Java class that is the Java equivalent of the JSON you could use a site like: json2pojo (http://www.jsonschema2pojo.org/) to do this for you.

Then to convert the JSON to the Java object you can do the following:

Gson = new Gson();
Object obj = (Object) gson.fromJson(json, Object.class);

Where Object is your custom object.

Leave a Comment