Gson parse json array with example

Gson parses JSON array meaning to Parsing JSON array with Google Gson library. Follow these steps to read JSON Array To read jsonString as an array we use the following syntax Gson gson=new Gson(); ElementType [] refVar=gson.fromJson(jsonString,ElementType[].class); To read jsonString as List TypeToken is used to find the type of class List eList=(List)gson.fromJson(reader, new TypeToken(){}.getType()); … Read more