class KrakenTradesDeserializer extends JsonDeserializer<KrakenPublicTrades> {

    @Override
    public KrakenPublicTrades deserialize(JsonParser jsonParser, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {<FILL_FUNCTION_BODY>}
  }


      List<KrakenPublicTrade> krakenTrades = new ArrayList<>();
      long last = 0;
      ObjectCodec oc = jsonParser.getCodec();
      JsonNode node = oc.readTree(jsonParser);
      Iterator<Entry<String, JsonNode>> tradesResultIterator = node.fields();
      while (tradesResultIterator.hasNext()) {
        Entry<String, JsonNode> entry = tradesResultIterator.next();
        String key = entry.getKey();
        JsonNode value = entry.getValue();
        if (key == "last") {
          last = value.asLong();
        } else if (value.isArray()) {
          for (JsonNode tradeJsonNode : value) {
            BigDecimal price = new BigDecimal(tradeJsonNode.path(0).asText());
            BigDecimal volume = new BigDecimal(tradeJsonNode.path(1).asText());
            double time = tradeJsonNode.path(2).asDouble();
            KrakenType type = KrakenType.fromString(tradeJsonNode.path(3).asText());
            KrakenOrderType orderType = KrakenOrderType.fromString(tradeJsonNode.path(4).asText());
            String miscellaneous = tradeJsonNode.path(5).asText();
            String tradeId = tradeJsonNode.path(6).asText();

            krakenTrades.add(
                new KrakenPublicTrade(
                    price, volume, time, type, orderType, miscellaneous, tradeId));
          }
        }
      }
      return new KrakenPublicTrades(krakenTrades, last);
    
<no_super_class>