code: public JSONObject put(String key, boolean value) throws JSONException {
          return this.put(key, value ? Boolean.TRUE : Boolean.FALSE);
      }
docs: Put a key/boolean pair in the JSONObject.
  
  @param key
  A key string.
  @param value
  A boolean which is the value.
  @return this.
  @throws JSONException
  If the value is non-finite number.
  @throws NullPointerException
  If the key is <code>null</code>.