json class : IsNull(int) method
Description
Gets a value indicating whether a value corresponding to the index is null.
Syntax
jsonInstance.IsNull(int index)
Arguments
Class | Name | Description |
int | index | An index. |
Return value
Class | Description |
bool | A value indicating whether a value is null. |
Sample code
1: | jsonIns = new json("[@name@,true,1000,null]".Replace("@","".DQ)); // array |
2: | bool isnull = jsonIns.IsNull(0); // false |
3: | isnull = jsonIns.IsNull(1); // false |
4: | isnull = jsonIns.IsNull(2); // false |
5: | isnull = jsonIns.IsNull(3); // true |
Notes
If the instance is an JSON object, an exception is raised.
If there is no value corresponding to the index, an exception is raised.
Only values that are direct children are searched.
Returns true if a value corresponding to the index is null. Otherwise it returns false.
Links for reference
None