While converting a JSON received from api response I came accross TypeRef, but I am not sure how does it works? Any pictorial representation or simplified version will be good. I read, but still not so much clear about it. Like we have map to store <K,V> but then what difference will TypeRef will do on object?
TypeReference<HashMap<String,Object>> typeRef = new TypeReference<HashMap<String,Object>>() {};