Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagejava
themeEmacs
titleJsonTree

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>>(){});