Untitled
unknown
java
a year ago
794 B
2
Indexable
Never
try { ObjectMapper objectMapper = new ObjectMapper(); // Deserialize the "parcelResponses" part into a list of ParcelResponse objects List<ParcelResponse> parcelResponses = objectMapper.readValue( json, objectMapper.getTypeFactory().constructCollectionType(List.class, ParcelResponse.class) ); // Now you can work with the list of ParcelResponse objects for (ParcelResponse parcelResponse : parcelResponses) { System.out.println("Waybill: " + parcelResponse.getWaybill()); System.out.println("Waybillpackageparcelid: " + parcelResponse.getWaybillpackageparcelid()); System.out.println("WaybillPackageId: " + parcelResponse.getWaybillPackageId()); } } catch (Exception e) { e.printStackTrace(); }