다음을 통해 공유


JSONObject.Opt(String) Method

Definition

Returns the value mapped by name, or null if no such mapping exists.

[Android.Runtime.Register("opt", "(Ljava/lang/String;)Ljava/lang/Object;", "GetOpt_Ljava_lang_String_Handler")]
public virtual Java.Lang.Object? Opt (string? name);
[<Android.Runtime.Register("opt", "(Ljava/lang/String;)Ljava/lang/Object;", "GetOpt_Ljava_lang_String_Handler")>]
abstract member Opt : string -> Java.Lang.Object
override this.Opt : string -> Java.Lang.Object

Parameters

name
String

Returns

Attributes

Remarks

Returns the value mapped by name, or null if no such mapping exists.

Java documentation for org.json.JSONObject.opt(java.lang.String).

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