private void parseArrayItems(JSONArray list) {
    while ( hasNext() ) {
      if ( scanFor(']') ) {
	break;
      }
      Object value = parseValue();
      list.add(value);
      char c = next(true);
      if ( c == ']' ) {
	break;
      }
      else if ( c != ',' ) {
	expected(',', c);
	break;
      }
    }
  }