JSONObject.Null Property

Definition

A sentinel value used to explicitly define a name with no value.

[Android.Runtime.Register("NULL")]
public static Java.Lang.Object? Null { get; }
[<Android.Runtime.Register("NULL")>]
static member Null : Java.Lang.Object

Property Value

Attributes

Remarks

A sentinel value used to explicitly define a name with no value. Unlike null, names with this value: <ul> <li>show up in the #names array <li>show up in the #keys iterator <li>return true for #has(String)<li>do not throw on #get(String)<li>are included in the encoded JSON string. </ul>

This value violates the general contract of Object#equals by returning true when compared to null. Its #toString method returns "null".

Java documentation for org.json.JSONObject.NULL.

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