Created
October 23, 2018 09:40
-
-
Save samuelstein/66031947e6c715c5b540e2a55b4a5687 to your computer and use it in GitHub Desktop.
Deserialize generic list with gson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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