code: public boolean nextBoolean() throws IOException {
      peek();
      if (token != JsonToken.BOOLEAN) {
          throw new IllegalStateException("Expected a boolean but was " + token
              + " at line " + getLineNumber() + " column " + getColumnNumber());
      }
  
      boolean result = (value == TRUE);
      advance();
      return result;
    }
docs: Returns the {@link JsonToken#BOOLEAN boolean} value of the next token,
  consuming it.
  
  @throws IllegalStateException if the next token is not a boolean or if
  this reader is closed.