Here you can find the source of json2pojo(String jsonStr, Class
public static <T> T json2pojo(String jsonStr, Class<T> clazz) throws Exception
//package com.java2s; //License from project: Apache License import com.fasterxml.jackson.databind.ObjectMapper; public class Main { private final static ObjectMapper objectMapper = new ObjectMapper(); /**// w w w. ja v a 2 s. c om * json string convert to javaBean */ public static <T> T json2pojo(String jsonStr, Class<T> clazz) throws Exception { return objectMapper.readValue(jsonStr, clazz); } }