I want to transfer a list object via Google Gson, but I don\'t know how to deserialize generic types.
What I tried after looking at this (BalusC\'s answer):
In My case @uncaught_exceptions's answer didn't work, I had to use List.class instead of java.lang.reflect.Type:
List.class
java.lang.reflect.Type
String jsonDuplicatedItems = request.getSession().getAttribute("jsonDuplicatedItems").toString(); List> entries = gson.fromJson(jsonDuplicatedItems, List.class);