Udostępnij za pośrednictwem


JSONObject.PutOpt(String, Object) Method

Definition

Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.

[Android.Runtime.Register("putOpt", "(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;", "GetPutOpt_Ljava_lang_String_Ljava_lang_Object_Handler")]
public virtual Org.Json.JSONObject PutOpt (string? name, Java.Lang.Object? value);
[<Android.Runtime.Register("putOpt", "(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;", "GetPutOpt_Ljava_lang_String_Ljava_lang_Object_Handler")>]
abstract member PutOpt : string * Java.Lang.Object -> Org.Json.JSONObject
override this.PutOpt : string * Java.Lang.Object -> Org.Json.JSONObject

Parameters

name
String
value
Object

Returns

Attributes

Exceptions

Remarks

Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.

Java documentation for org.json.JSONObject.putOpt(java.lang.String, java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to