0 votes
1 view
in Java by (10.2k 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 (46.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

0 votes
1 answer
asked Sep 24, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 31, 2019 in Java by Anvi (10.2k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...