code: public String nextName() throws IOException {
          peek();
          if (token != JsonToken.NAME) {
              throw new IllegalStateException("Expected a name but was " + peek());
          }
          String result = name;
          advance();
          return result;
      }
docs: Returns the next token, a {@link JsonToken#NAME property name}, and
  consumes it.
  
  @throws IOException if the next token in the stream is not a property
  name.