import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String str = "{\"a\":\"b\",\"c\":\"d\"}";
ObjectMapper objectMapper = new ObjectMapper();
Map map = objectMapper.readValue(str, Map.class);
System.out.println(map);
}
}
网友评论