Put a key/value pair in the JSONObject, but only if the key and the value are both non-null. @param key A key string. @param value An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or the JSONObject.NULL object. @retu
(String key, Object value)
| 1131 | * @throws JSONException If the value is a non-finite number. |
| 1132 | */ |
| 1133 | public JSONObject putOpt(String key, Object value) throws JSONException { |
| 1134 | if (key != null && value != null) { |
| 1135 | put(key, value); |
| 1136 | } |
| 1137 | return this; |
| 1138 | } |
| 1139 | |
| 1140 | |
| 1141 | /** |