Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Deserialize generic list with gson
Type listType = new TypeToken<ArrayList<YourClass>>(){}.getType();
List<YourClass> yourClassList = new Gson().fromJson(jsonArray, listType);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment