Put a key/value pair in the JSONObject.

@param key A key string.
@param value A boolean which is the value.
@return this.
542780
public function put($key, $value)
	{
		if(gettype($value) == 'object' && !($value instanceof JSONObject) && !($value instanceof JSONArray))
		{
			$value = new JSONObject($value);
		}
		if($key == '' || $key == NULL)
			throw new JSONException("Null key.");
		
		$this->testValidity($value);
		$this->map[$key] = $value;
		
		return $this;
	}
1222082
public JsonArray add(Object value) {
        if (value == this) {
            throw new IllegalArgumentException("Cannot add self");
        } else if (value == JsonValue.NULL) {
            addNull();
        } else if (checkType(value)) {
            content.add(value);
        } else {
            throw new IllegalArgumentException("Unsupported type for JsonArray: " + value.getClass());
        }
        return this;
    }
334101
public String put(final String key, final String Value) {
        return parameters.put(key, Value);
    }
231549
public final NFastStringMap<V> put(final String key, final V value)
    {
        m_jso.put(NUtils.doKeyRepair(key), value);

        return this;
    }
905437
public @Nonnull JsonBuilder put(String key, boolean b) {
        object.put(key, primitive(b));
        return this;
    }
406131
public Attributes put(String key, String value) {
        int i = indexOfKey(key);
        if (i != NotFound)
            vals[i] = value;
        else
            add(key, value);
        return this;
    }
362450
public JSONStringer value(boolean value) throws JSONException {
		if (this.stack.isEmpty()) {
			throw new JSONException("Nesting problem");
		}
		beforeValue();
		this.out.append(value);
		return this;
	}
1330053
public Payload add(String key, String value) {
    getData().put(key, value);
    return this;
  }
342413
public JSONObject put(String key, double value) throws JSONException {
        put(key, Double.valueOf(value));
        return this;
    }
688766
public static <T> JsonObjectBase buildObjectSuccess(String key, T value) {

        JsonObject json = new JsonObject();
        json.addData(key, value);

        LOG.info(json.toString());

        return json;
    }
838410
public String put(final String key, String value) {
        if (key == null || initProps == null)
            return null;

        return initProps.put(key, value);
    }
712067
public JsonObject put(String name, List<?> value) {
        return put(name, JsonArray.from(value));
    }
286251
public JSONObject putOnce(Enum<?> key, Object value) throws JSONException {
		return putOnce(key.name(), value);
	}
353395
public Object put(String key, JsonHash value) {
		if (value == null) {
			stateMap.put(key, Type.NULL);
		} else {
			stateMap.put(key, Type.HASH);
		}

		return super.put(key, value);
	}
652288
public JSONObject put(String key, long value) throws JSONException {
        put(key, Long.valueOf(value));
        return this;
    }
225373
public <T> void put(@NonNull String key, @NonNull T value) {
    Preconditions.checkNotNull(value, VALUE_IS_NULL);
    put(key, value, TypeToken.fromValue(value));
  }
667900
public Object put(final String key, final Object value) {
		return additionalData.put(key, value);
	}