Here you can find the source of readValue(String jsonStr, Class
public static <T> T readValue(String jsonStr, Class<T> valueType)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import com.fasterxml.jackson.databind.ObjectMapper; public class Main { public static <T> T readValue(String jsonStr, Class<T> valueType) { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); try {/*from ww w .ja v a 2 s. c o m*/ return objectMapper.readValue(jsonStr, valueType); } catch (Exception e) { e.printStackTrace(); } return null; } }