I want to convert my string response to POJO Class. I have already created a POJO Class named account with the below variable but can't map the response to it.
My Response [ { "accountNumber": "12345", "accountType": "Banking" }, { "accountNumber": "12389", "accountType": "Banking" }, { "accountNumber": "12356", "accountType": "Investment" } ]
Api Call:
ResponseEntity resp = restTemplate.exchange(url, HttpMethod.GET, entity, String.class);