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