code: public double nextDouble() throws IOException {
          peek();
          if (token != JsonToken.STRING && token != JsonToken.NUMBER) {
              throw new IllegalStateException("Expected a double but was " + token);
          }
  
          double result = Double.parseDouble(value);
          advance();
          return result;
      }
docs: Returns the {@link JsonToken#NUMBER double} value of the next token,
  consuming it. If the next token is a string, this method will attempt to
  parse it as a double using {@link Double#parseDouble(String)}.
  
  @throws IllegalStateException if the next token is not a literal value.