Can someone enlighten me what the following code does as described here https://sites.google.com/site/gson/gson-user-guide#TOC-Serializing-and-Deserializing-Generic-Types?
Type collectionType = new TypeToken<Collection<Integer>>(){}.getType();
I am using it to convert JSON to a Java Map which works perfectly fine, but I haven't seen such a syntax before. Here is my code
Map<String, Object> map = new Gson().fromJson(reader, new TypeToken<HashMap<String, Object>>() {}.getType());