Skip to content

Instantly share code, notes, and snippets.

@samuelstein
Created October 23, 2018 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelstein/66031947e6c715c5b540e2a55b4a5687 to your computer and use it in GitHub Desktop.
Save samuelstein/66031947e6c715c5b540e2a55b4a5687 to your computer and use it in GitHub Desktop.
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