0 votes
1 view
in Java by (8.5k points)

I have two questions:

  • How to map a list of JSON objects using Spring RestTemplate.
  • How to map nested JSON objects.

I am trying to consume https://bitpay.com/api/rates, by following the tutorial from http://spring.io/guides/gs/consuming-rest/.

1 Answer

0 votes
by (42.1k points)

For me this worked

Object[] forNow = template.getForObject("URL", Object[].class);

    searchList= Arrays.asList(forNow);

Where Object is the class you want

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !