LgoCurrencies { public List<LgoCurrency> getCurrencies() { return currencies; } LgoCurrencies(@JsonProperty("currencies") List<LgoCurrency> currencies); List<LgoCurrency> getCurrencies();  }
@Test public void itCanReadJson() throws IOException { InputStream is = LgoProductsTest.class.getResourceAsStream( "/org/knowm/xchange/lgo/currency/example-currencies-data.json"); ObjectMapper mapper = new ObjectMapper(); LgoCurrencies currencies = mapper.readValue(is, LgoCurrencies.class); assertThat(currencies.getCurrencies()).hasSize(2); assertThat(currencies.getCurrencies().get(0)) .isEqualToComparingFieldByField(new LgoCurrency("Bitcoin", "BTC", 8)); assertThat(currencies.getCurrencies().get(1)) .isEqualToComparingFieldByField(new LgoCurrency("United States Dollar", "USD", 4)); }