I have pinpointed where the issue is happening but having hard time resolving it .
My Json Response is such
{
{...},
{...},
{...}
}
This is my current code to retrieve the response.
ResponseEntity<Object[]> responseEntity = restTemplate.getForEntity("http://api.walmartlabs.com/v1/nbp?apiKey={apiKey}&itemId={itemID}", Object[].class,WalmartAPIKey.APIKey,productId);
ProductRecommendations[] pra = (ProductRecommendations[]) responseEntity.getBody();
I can also see the array in responseEntity.getBody()
but the issue is I am unable to map it to a POJO gives me type casting error.
Is there a way to get around it or do it a better way?
>, as shown in the specific response I linked to.