LgoPriceHistory { public List<LgoCandlestick> getPrices() { return prices; } LgoPriceHistory(@JsonProperty("prices") List<LgoCandlestick> prices); List<LgoCandlestick> getPrices(); @Override String toString();  }
@Test public void itCanReadJson() throws IOException, ParseException { InputStream is = LgoProductsTest.class.getResourceAsStream( "/org/knowm/xchange/lgo/marketdata/example-pricehistory-data.json"); ObjectMapper mapper = new ObjectMapper(); LgoPriceHistory response = mapper.readValue(is, LgoPriceHistory.class); assertThat(response).isNotNull(); assertThat(response.getPrices()).hasSize(2); LgoCandlestick candlestick = response.getPrices().get(0); assertThat(candlestick.getTime()).isEqualTo(dateFormat.parse("2019-12-20T15:00:00Z")); assertThat(candlestick.getLow()).isEqualTo(new BigDecimal("4396.7000")); assertThat(candlestick.getHigh()).isEqualTo(new BigDecimal("4654.4000")); assertThat(candlestick.getOpen()).isEqualTo(new BigDecimal("4592.6000")); assertThat(candlestick.getClose()).isEqualTo(new BigDecimal("4531.6000")); assertThat(candlestick.getVolume()).isEqualTo(new BigDecimal("485.35050000")); }