java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.testing.models.Account
The issue’s coming from Jackson. When it doesn’t have enough information on what class to deserialize to, it uses LinkedHashMap. Since you’re not informing Jackson of the element type of your ArrayList, it doesn’t know that you want to deserialize into an ArrayList of Accounts. So it falls back to the default. Instead, you could … Read more