Put a key/boolean pair in the JSONObject. @webref jsonobject:method @brief Put a key/boolean pair in the JSONObject @param key a key string @param value the value to assign @return this. @throws RuntimeException If the key is null. @see JSONObject#setInt(String, int) @see JSONObject#setFloat(String
(String key, boolean value)
| 1245 | * @see JSONObject#setString(String, String) |
| 1246 | */ |
| 1247 | public JSONObject setBoolean(String key, boolean value) { |
| 1248 | this.put(key, value ? Boolean.TRUE : Boolean.FALSE); |
| 1249 | return this; |
| 1250 | } |
| 1251 | |
| 1252 | /** |
| 1253 | * @webref jsonobject:method |