docs: private void init(JSONTokener x) {
  		char c;
  		String key;
  
  		if (x.nextClean() != '{') {
  			throw x.syntaxError("A JSONObject text must begin with '{'");
  		}
  		for (;;) {
  			c = x.nextClean();
  			switch (c) {
  			case 0:
  				throw x.syntaxError("A JSONObject text must end with '}'");
  			case '}':
  				return;
  			default:
  				x.back();
  				key = x.nextValue().toString();
  			}
  
  			// The key is followed by ':'.
  
  			c = x.nextClean();
  			if (c != ':') {
  				throw x.syntaxError("Expected a ':' after a key");
  			}
  			this.putOnce(key, x.nextValue());
  
  			// Pairs are separated by ','.
  
  			switch (x.nextClean()) {
  			case ';':
  			case ',':
  				if (x.nextClean() == '}') {
  					return;
  				}
  				x.back();
  				break;
  			case '}':
  				return;
  			default:
  				throw x.syntaxError("Expected a ',' or '}'");
  			}
  		}
  	}