I\'m trying to consume a HAL-based REST service with the RestTemplate class. The response body looks like this:
{
\"_embedded\": {
\"school:teachers\":
I too faced a similar problem. And the way I chose to work around it is :
ResponseEntity response = restTemplate.exchange(
"http://localhost:8080/payment/search/findByApprovalDate?approvalDate=2017-11-06", HttpMethod.GET,
null, String.class);
String data = response.getBody();
ObjectMapper om = new ObjectMapper();
om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode jsNode = om.readTree(data);
String test = jsNode.at("/_embedded/payment").toString();
payments = om.readValue(test, new TypeReference>() {
});