Here you can find the source of jsonStringToList(String jsonArrStr, Class
public static <T> List<T> jsonStringToList(String jsonArrStr, Class<T> clazz)
//package com.java2s; //License from project: Apache License import java.util.List; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; public class Main { public static <T> List<T> jsonStringToList(String jsonArrStr, Class<T> clazz) { try {//from ww w. j a v a 2 s . c o m ObjectMapper mapper = new ObjectMapper(); JavaType javaType = mapper.getTypeFactory().constructParametricType(List.class, clazz); return mapper.readValue(jsonArrStr, javaType); } catch (Exception e) { return null; } } }