Append a value.<p>

@param s a string value
@return this
@throws JSONException if the value is out of sequence
508280
private JSONWriter append(String s) throws JSONException {

        if (s == null) {
            throw new JSONException("Null pointer");
        }
        if ((m_mode == 'o') || (m_mode == 'a')) {
            try {
                if (m_comma && (m_mode == 'a')) {
                    m_writer.write(',');
                }
                m_writer.write(s);
            } catch (IOException e) {
                throw new JSONException(e);
            }
            if (m_mode == 'o') {
                m_mode = 'k';
            }
            m_comma = true;
            return this;
        }
        throw new JSONException("Value out of sequence.");
    }
967310
public StrBuilder append(final String str) {
        if (str == null) {
            return appendNull();
        }
        final int strLen = str.length();
        if (strLen > 0) {
            final int len = length();
            ensureCapacity(len + strLen);
            str.getChars(0, strLen, buffer, len);
            size += strLen;
        }
        return this;
    }
393724
public void append(XMLString s) {
        append(s.ch, s.offset, s.length);
    }
323234
public JSONObject put(String key, boolean value) throws JSONException {
        return this.put(key, value ? Boolean.TRUE : Boolean.FALSE);
    }
946199
public JsonObject putOpt(String name, Object value) throws JsonException {
        if (name == null || value == null) {
            return this;
        }
        return put(name, value);
    }
690590
public Expression add(String field, JsonNode value) {
        try {
            ((ObjectNode) node).set(field, value);
            return this;
        } catch (ClassCastException e) {
            throw new RuntimeException("Object node expected while adding " + field);
        }
    }
652288
public JSONObject put(String key, long value) throws JSONException {
        put(key, Long.valueOf(value));
        return this;
    }
1140824
public JsonArray add(JsonValue value) {
    if (value == null) {
      throw new NullPointerException("value is null");
    }
    values.add(value);
    return this;
  }
996359
@Override
    public StrBuilder append(final CharSequence seq) {
        if (seq == null) {
            return appendNull();
        }
        return append(seq.toString());
    }
914276
public void append(final StringBuffer sb) {
        if (sb == null) {
            return;
        }
        provideCapacity(length + sb.length());
        sb.getChars(0, sb.length(), c, length);
        length += sb.length();
    }
978999
@Override
    public boolean add(final String s) {
        JsonPrimitive primitive = primitive(s);
        if (!contains(primitive)) {
            return add(primitive);
        } else {
            return false;
        }
    }
1110668
public char next(char c) throws JSONException {
		char n = this.next();
		if (n != c) {
			throw this.syntaxError("Expected '" + c + "' and instead saw '" + n + "'");
		}
		return n;
	}
495340
public JsonDocument append(String documentId, String json) {
        this.bucket.append(JsonDocument.create(documentId, JsonObject.fromJson(json)));
        return this.get(documentId);
    }
573568
private void appendTo(StringBuilder sb) {
    if (sb.length() > 1) {
      sb.append(", ");
    }
    sb.append(key).append(": ").append(value);
    for (HamtPMap<K, V> child : children) {
      child.appendTo(sb);
    }
  }
211757
public JSONObject putOpt(String key, Object value) throws JSONException {
		if (key != null && value != null) {
			this.put(key, value);
		}
		return this;
	}
188775
public StringColumn append(String value) {
        try {
            lookupTable.append(value);
        } catch (NoKeysAvailableException ex) {
            lookupTable = lookupTable.promoteYourself();
            try {
                lookupTable.append(value);
            } catch (NoKeysAvailableException e) {
                // this can't happen
                throw new IllegalStateException(e);
            }
        }
        return this;
    }
1115448
private JSONArray addValue( Object value, JsonConfig jsonConfig ) {
      return _addValue( processValue( value, jsonConfig ), jsonConfig );
   }