Guest User

Untitled

a guest
Mar 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. String jsonData = xml;
  2. //create ObjectMapper instance
  3. ObjectMapper objectMapper = new ObjectMapper();
  4.  
  5. objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
  6. //convert json string to object
  7.  
  8. List<Items> items = objectMapper.readValue(jsonData, new TypeReference<List<Items>>(){});
Add Comment
Please, Sign In to add comment