JSONObject.Quote(String) Method

Definition

Encodes data as a JSON string.

[Android.Runtime.Register("quote", "(Ljava/lang/String;)Ljava/lang/String;", "")]
public static string Quote (string? data);
[<Android.Runtime.Register("quote", "(Ljava/lang/String;)Ljava/lang/String;", "")>]
static member Quote : string -> string

Parameters

data
String

the string to encode. Null will be interpreted as an empty string.

Returns

Attributes

Remarks

Encodes data as a JSON string. This applies quotes and any necessary character escaping.

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