JsonTree
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;


ObjectMapper om = new ObjectMapper();
JsonNode rootJson = om.readTree(response.toString());
String listResult = rootJson.get("message").get("result").get("itemList").get("item").toString();
result = om.readValue( listResult , new TypeReference<List<SomeList>>(){});
  • No labels