hmm.. If I call this function
http://pastebin.com/zSa0H0jk like: val myList2: List<Employee> = fromJsonGenerics(jsonString)
and I try to print some values of the mylist, for example println("firstname: " + myList2.get(0).firstName, it is complaining me that: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.entity.Employee
The question is, how can I in Generics tell that the function should return List<Employee>?