code: public char nextClean() throws JSONException {
  
          for (;;) {
              char c = next();
              if (c == '/') {
                  switch (next()) {
                      case '/':
                          do {
                              c = next();
                          } while ((c != '\n') && (c != '\r') && (c != 0));
                          break;
                      case '*':
                          for (;;) {
                              c = next();
                              if (c == 0) {
                                  throw syntaxError("Unclosed comment");
                              }
                              if (c == '*') {
                                  if (next() == '/') {
                                      break;
                                  }
                                  back();
                              }
                          }
                          break;
                      default:
                          back();
                          return '/';
                  }
              } else if (c == '#') {
                  do {
                      c = next();
                  } while ((c != '\n') && (c != '\r') && (c != 0));
              } else if ((c == 0) || (c > ' ')) {
                  return c;
              }
          }
      }
docs: Get the next char in the string, skipping whitespace
  and comments (slashslash, slashstar, and hash).<p>
  
  @return  a character, or 0 if there are no more characters
  @throws JSONException if something goes wrong