JSON Object Methods
This page lists the methods of a JSON object variable. Methods can be accessed using the dot(.
) operator.
containsKey()
containsKey()
Syntax
jsonobject.containsKey( keyStr )
Description
Returns a boolean value indicating whether the JSON object contains a specified key.
Return type
BOOL
Parameters
Parameter | Description | Data type |
| A string. |
|
getBool()
getBool()
Syntax
jsonobject.getBool( keyStr )
Description
Returns the boolean value associated with a specified key.
Return type
BOOL
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
getDouble()
getDouble()
Syntax
jsonobject.getDouble( keyStr )
Description
Returns the double value associated with a specified key.
Return type
DOUBLE
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
getInt()
getInt()
Syntax
jsonobject.getInt( keyStr )
Description
Returns the integer value associated with a specified key.
Return type
INT
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
getJsonArray()
getJsonArray()
Syntax
jsonobject.getJsonArray( keyStr )
Description
Returns the JSON array value associated with a specified key.
Return type
JSONARRAY
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
getJsonObject()
getJsonObject()
Syntax
jsonobject.getJsonObject( keyStr )
Description
Returns the value associated with a specified key.
Return type
JSONOBJECT
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
getString()
getString()
Syntax
jsonobject.getString( keyStr )
Description
Returns the string value associated with a specified key.
Return type
STRING
Parameters
Parameter | Description | Data type |
| The key whose value to return |
|
Last updated