Untitled
unknown
java
2 years ago
794 B
10
Indexable
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();
}Editor is loading...