I have rest url that gives me all countries - http://api.geonames.org/countryInfoJSON?username=volodiaL.
I use RestTemplate from spring 3 to parse returned json into
If you want to avoid using an extra Class and List you could simply use a Map.
The data structure translates into Map
String resourceEndpoint = "http://api.geonames.org/countryInfoJSON?username=volodiaL";
Map> geonames = restTemplate.getForObject(resourceEndpoint, Map.class);
List countries = geonames.get("geonames");