Sdílet prostřednictvím


JSONArray Constructors

Definition

Overloads

JSONArray()

Creates a JSONArray with no values.

JSONArray(Object)

Creates a new JSONArray with values from the given primitive array.

JSONArray(JSONTokener)

Creates a new JSONArray with values from the next array in the tokener.

JSONArray(ICollection)

Creates a new JSONArray by copying all values from the given collection.

JSONArray(String)

Creates a new JSONArray with values from the JSON string.

JSONArray(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

JSONArray()

Creates a JSONArray with no values.

[Android.Runtime.Register(".ctor", "()V", "")]
public JSONArray ();
Attributes

Remarks

Creates a JSONArray with no values.

Java documentation for org.json.JSONArray.JSONArray().

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

JSONArray(Object)

Creates a new JSONArray with values from the given primitive array.

[Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")]
public JSONArray (Java.Lang.Object? array);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")>]
new Org.Json.JSONArray : Java.Lang.Object -> Org.Json.JSONArray

Parameters

array
Object
Attributes

Exceptions

Remarks

Creates a new JSONArray with values from the given primitive array.

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

JSONArray(JSONTokener)

Creates a new JSONArray with values from the next array in the tokener.

[Android.Runtime.Register(".ctor", "(Lorg/json/JSONTokener;)V", "")]
public JSONArray (Org.Json.JSONTokener? readFrom);
[<Android.Runtime.Register(".ctor", "(Lorg/json/JSONTokener;)V", "")>]
new Org.Json.JSONArray : Org.Json.JSONTokener -> Org.Json.JSONArray

Parameters

readFrom
JSONTokener

a tokener whose nextValue() method will yield a JSONArray.

Attributes

Exceptions

if the parse fails or doesn't yield a JSONArray.

Remarks

Creates a new JSONArray with values from the next array in the tokener.

Java documentation for org.json.JSONArray.JSONArray(org.json.JSONTokener).

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

JSONArray(ICollection)

Creates a new JSONArray by copying all values from the given collection.

[Android.Runtime.Register(".ctor", "(Ljava/util/Collection;)V", "")]
public JSONArray (System.Collections.ICollection? copyFrom);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Collection;)V", "")>]
new Org.Json.JSONArray : System.Collections.ICollection -> Org.Json.JSONArray

Parameters

copyFrom
ICollection

a collection whose values are of supported types. Unsupported values are not permitted and will yield an array in an inconsistent state.

Attributes

Remarks

Creates a new JSONArray by copying all values from the given collection.

Java documentation for org.json.JSONArray.JSONArray(java.util.Collection).

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

JSONArray(String)

Creates a new JSONArray with values from the JSON string.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public JSONArray (string? json);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Org.Json.JSONArray : string -> Org.Json.JSONArray

Parameters

json
String

a JSON-encoded string containing an array.

Attributes

Exceptions

if the parse fails or doesn't yield a JSONArray.

Remarks

Creates a new JSONArray with values from the JSON string.

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

JSONArray(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected JSONArray (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Org.Json.JSONArray : nativeint * Android.Runtime.JniHandleOwnership -> Org.Json.JSONArray

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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