다음을 통해 공유


JSONObject.GetString(String) Method

Definition

Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists.

[Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Handler")]
public virtual string GetString (string name);
[<Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Handler")>]
abstract member GetString : string -> string
override this.GetString : string -> string

Parameters

name
String

Returns

Attributes

Exceptions

if no such mapping exists.

Remarks

Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists.

Java documentation for org.json.JSONObject.getString(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