Here you can find the source of jsonToList(String json, Class> parametrized, Class>... parameterClasses)
public static <T> T jsonToList(String json, Class<?> parametrized, Class<?>... parameterClasses)
//package com.java2s; //License from project: Apache License import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.type.TypeFactory; public class Main { private static final ObjectMapper MAPPER = new ObjectMapper(); public static <T> T jsonToList(String json, Class<?> parametrized, Class<?>... parameterClasses) { try {//from w ww. j a v a2 s .co m TypeFactory typeFactory = MAPPER.getTypeFactory(); return MAPPER.readValue(json, typeFactory.constructParametricType(parametrized, parameterClasses)); } catch (Exception ex) { throw new RuntimeException(ex); } } }