public static <K, V> List<Map<K, V>> castListMap(Object obj, Class<K> kCalzz, Class<V> vCalzz) { List<Map<K, V>> result = new ArrayList<>(); if (obj instanceof List<?>) { for (Object mapObj : (List<?>) obj) { if (mapObj instanceof Map<?, ?>) { Map<K, V> map = new HashMap<>(16); for (Map.Entry<?, ?> entry : ((Map<?, ?>) mapObj).entrySet()) { map.put(kCalzz.cast(entry.getKey()), vCalzz.cast(entry.getValue())); } result.add(map); } } return result; } return null; }