private T readNext() {
      try {
        JsonToken jsonToken = parser.nextToken();
        if (jsonToken == null) {
          return null;
        }

        if (jsonToken == JsonToken.START_ARRAY) {
          jsonToken = parser.nextToken();
        }

        if (jsonToken == JsonToken.END_ARRAY) {
          ensureClosed(this);
          return null;
        }

        return objectReader.readValue(parser);
      } catch (IOException e) {
        // Input Stream closed automatically by parser
        throw new DecodeException(response.status(), e.getMessage(), response.request(), e);
      }
    }
Jackson decoder which return a closeable iterator. Returned iterator auto-close the {@code
Response} when it reached json array end or failed to parse stream. If this iterator is not
fetched till the end, it has to be casted to {@code Closeable} and explicity {@code
Closeable#close} by the consumer.

<p>

<p>

<p>Example: <br>

<pre>
<code>
Feign.builder()
  .decoder(JacksonIteratorDecoder.create())
  .doNotCloseAfterDecode() // Required to fetch the iterator after the response is processed, need to be close
  .target(GitHub.class, "https://api.github.com");
interface GitHub {
 {@literal @}RequestLine("GET /repos/{owner}/{repo}/contributors")
  Iterator<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);
}</code>
</pre>
jackson/src/main/java/feign/jackson/JacksonIteratorDecoder.java