JSONArray.Put Method

Definition

Overloads

Put(Double)

Appends value to the end of this array.

Put(Int32, Int64)

Sets the value at index to value, null padding this array to the required length if necessary.

Put(Int32, Int32)

Sets the value at index to value, null padding this array to the required length if necessary.

Put(Int32, Double)

Sets the value at index to value, null padding this array to the required length if necessary.

Put(Int32, Boolean)

Sets the value at index to value, null padding this array to the required length if necessary.

Put(Boolean)

Appends value to the end of this array.

Put(Int64)

Appends value to the end of this array.

Put(Int32)

Appends value to the end of this array.

Put(Object)

Appends value to the end of this array.

Put(Int32, Object)

Sets the value at index to value, null padding this array to the required length if necessary.

Put(Double)

Appends value to the end of this array.

[Android.Runtime.Register("put", "(D)Lorg/json/JSONArray;", "GetPut_DHandler")]
public virtual Org.Json.JSONArray? Put (double value);
[<Android.Runtime.Register("put", "(D)Lorg/json/JSONArray;", "GetPut_DHandler")>]
abstract member Put : double -> Org.Json.JSONArray
override this.Put : double -> Org.Json.JSONArray

Parameters

value
Double

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Appends value to the end of this array.

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

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

Put(Int32, Int64)

Sets the value at index to value, null padding this array to the required length if necessary.

[Android.Runtime.Register("put", "(IJ)Lorg/json/JSONArray;", "GetPut_IJHandler")]
public virtual Org.Json.JSONArray? Put (int index, long value);
[<Android.Runtime.Register("put", "(IJ)Lorg/json/JSONArray;", "GetPut_IJHandler")>]
abstract member Put : int * int64 -> Org.Json.JSONArray
override this.Put : int * int64 -> Org.Json.JSONArray

Parameters

index
Int32
value
Int64

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Sets the value at index to value, null padding this array to the required length if necessary. If a value already exists at index, it will be replaced.

Java documentation for org.json.JSONArray.put(int, long).

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

Put(Int32, Int32)

Sets the value at index to value, null padding this array to the required length if necessary.

[Android.Runtime.Register("put", "(II)Lorg/json/JSONArray;", "GetPut_IIHandler")]
public virtual Org.Json.JSONArray? Put (int index, int value);
[<Android.Runtime.Register("put", "(II)Lorg/json/JSONArray;", "GetPut_IIHandler")>]
abstract member Put : int * int -> Org.Json.JSONArray
override this.Put : int * int -> Org.Json.JSONArray

Parameters

index
Int32
value
Int32

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Sets the value at index to value, null padding this array to the required length if necessary. If a value already exists at index, it will be replaced.

Java documentation for org.json.JSONArray.put(int, int).

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

Put(Int32, Double)

Sets the value at index to value, null padding this array to the required length if necessary.

[Android.Runtime.Register("put", "(ID)Lorg/json/JSONArray;", "GetPut_IDHandler")]
public virtual Org.Json.JSONArray? Put (int index, double value);
[<Android.Runtime.Register("put", "(ID)Lorg/json/JSONArray;", "GetPut_IDHandler")>]
abstract member Put : int * double -> Org.Json.JSONArray
override this.Put : int * double -> Org.Json.JSONArray

Parameters

index
Int32
value
Double

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Sets the value at index to value, null padding this array to the required length if necessary. If a value already exists at index, it will be replaced.

Java documentation for org.json.JSONArray.put(int, double).

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

Put(Int32, Boolean)

Sets the value at index to value, null padding this array to the required length if necessary.

[Android.Runtime.Register("put", "(IZ)Lorg/json/JSONArray;", "GetPut_IZHandler")]
public virtual Org.Json.JSONArray? Put (int index, bool value);
[<Android.Runtime.Register("put", "(IZ)Lorg/json/JSONArray;", "GetPut_IZHandler")>]
abstract member Put : int * bool -> Org.Json.JSONArray
override this.Put : int * bool -> Org.Json.JSONArray

Parameters

index
Int32
value
Boolean

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Sets the value at index to value, null padding this array to the required length if necessary. If a value already exists at index, it will be replaced.

Java documentation for org.json.JSONArray.put(int, boolean).

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

Put(Boolean)

Appends value to the end of this array.

[Android.Runtime.Register("put", "(Z)Lorg/json/JSONArray;", "GetPut_ZHandler")]
public virtual Org.Json.JSONArray? Put (bool value);
[<Android.Runtime.Register("put", "(Z)Lorg/json/JSONArray;", "GetPut_ZHandler")>]
abstract member Put : bool -> Org.Json.JSONArray
override this.Put : bool -> Org.Json.JSONArray

Parameters

value
Boolean

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Remarks

Appends value to the end of this array.

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

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

Put(Int64)

Appends value to the end of this array.

[Android.Runtime.Register("put", "(J)Lorg/json/JSONArray;", "GetPut_JHandler")]
public virtual Org.Json.JSONArray? Put (long value);
[<Android.Runtime.Register("put", "(J)Lorg/json/JSONArray;", "GetPut_JHandler")>]
abstract member Put : int64 -> Org.Json.JSONArray
override this.Put : int64 -> Org.Json.JSONArray

Parameters

value
Int64

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Remarks

Appends value to the end of this array.

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

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

Put(Int32)

Appends value to the end of this array.

[Android.Runtime.Register("put", "(I)Lorg/json/JSONArray;", "GetPut_IHandler")]
public virtual Org.Json.JSONArray? Put (int value);
[<Android.Runtime.Register("put", "(I)Lorg/json/JSONArray;", "GetPut_IHandler")>]
abstract member Put : int -> Org.Json.JSONArray
override this.Put : int -> Org.Json.JSONArray

Parameters

value
Int32

a finite value. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Remarks

Appends value to the end of this array.

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

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

Put(Object)

Appends value to the end of this array.

[Android.Runtime.Register("put", "(Ljava/lang/Object;)Lorg/json/JSONArray;", "GetPut_Ljava_lang_Object_Handler")]
public virtual Org.Json.JSONArray? Put (Java.Lang.Object? value);
[<Android.Runtime.Register("put", "(Ljava/lang/Object;)Lorg/json/JSONArray;", "GetPut_Ljava_lang_Object_Handler")>]
abstract member Put : Java.Lang.Object -> Org.Json.JSONArray
override this.Put : Java.Lang.Object -> Org.Json.JSONArray

Parameters

value
Object

a JSONObject, JSONArray, String, Boolean, Integer, Long, Double, JSONObject#NULL, or null. May not be Double#isNaN() NaNs or Double#isInfinite() infinities. Unsupported values are not permitted and will cause the array to be in an inconsistent state.

Returns

this array.

Attributes

Remarks

Appends value to the end of this array.

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

Put(Int32, Object)

Sets the value at index to value, null padding this array to the required length if necessary.

[Android.Runtime.Register("put", "(ILjava/lang/Object;)Lorg/json/JSONArray;", "GetPut_ILjava_lang_Object_Handler")]
public virtual Org.Json.JSONArray? Put (int index, Java.Lang.Object? value);
[<Android.Runtime.Register("put", "(ILjava/lang/Object;)Lorg/json/JSONArray;", "GetPut_ILjava_lang_Object_Handler")>]
abstract member Put : int * Java.Lang.Object -> Org.Json.JSONArray
override this.Put : int * Java.Lang.Object -> Org.Json.JSONArray

Parameters

index
Int32
value
Object

a JSONObject, JSONArray, String, Boolean, Integer, Long, Double, JSONObject#NULL, or null. May not be Double#isNaN() NaNs or Double#isInfinite() infinities.

Returns

this array.

Attributes

Exceptions

Remarks

Sets the value at index to value, null padding this array to the required length if necessary. If a value already exists at index, it will be replaced.

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