Here you can find the source of decode(String s, Class
public static <T> T decode(String s, Class<T> clazz) throws IOException
//package com.java2s; //License from project: Open Source License import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; public class Main { private static final ObjectMapper objectMapper = new ObjectMapper(); public static <T> T decode(String s, Class<T> clazz) throws IOException { return objectMapper.readValue(s, clazz); }/*from www . j a v a2 s .c o m*/ }