private JSONWriter append(String string) throws JSONException {
		if (string == null) {
			throw new JSONException("Null pointer");
		}
		if (this.mode == 'o' || this.mode == 'a') {
			try {
				if (this.comma && this.mode == 'a') {
					this.writer.write(',');
				}
				this.writer.write(string);
			} catch (IOException e) {
				throw new JSONException(e);
			}
			if (this.mode == 'o') {
				this.mode = 'k';
			}
			this.comma = true;
			return this;
		}
		throw new JSONException("Value out of sequence.");
	}