JSONArray.OptJSONObject(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the value at index if it exists and is a JSONObject.
[Android.Runtime.Register("optJSONObject", "(I)Lorg/json/JSONObject;", "GetOptJSONObject_IHandler")]
public virtual Org.Json.JSONObject? OptJSONObject(int index);
[<Android.Runtime.Register("optJSONObject", "(I)Lorg/json/JSONObject;", "GetOptJSONObject_IHandler")>]
abstract member OptJSONObject : int -> Org.Json.JSONObject
override this.OptJSONObject : int -> Org.Json.JSONObject
Parameters
- index
- Int32
The zero-based index of the value to read.
Returns
The JSONObject at the requested index, or null if the value is missing, null, or has another type.
- Attributes
Remarks
Returns the value at index if it exists and is a JSONObject. Returns null otherwise.
Java documentation for org.json.JSONArray.optJSONObject(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.