JSON Object Methods

This page lists the methods of a JSON object variable. Methods can be accessed using the dot(.) operator.

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

keyStr

A string.

STRING

getBool()

Syntax

jsonobject.getBool( keyStr )

Description

Returns the boolean value associated with a specified key.

Return type

BOOL

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING

getDouble()

Syntax

jsonobject.getDouble( keyStr )

Description

Returns the double value associated with a specified key.

Return type

DOUBLE

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING

getInt()

Syntax

jsonobject.getInt( keyStr )

Description

Returns the integer value associated with a specified key.

Return type

INT

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING

getJsonArray()

Syntax

jsonobject.getJsonArray( keyStr )

Description

Returns the JSON array value associated with a specified key.

Return type

JSONARRAY

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING

getJsonObject()

Syntax

jsonobject.getJsonObject( keyStr )

Description

Returns the value associated with a specified key.

Return type

JSONOBJECT

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING

getString()

Syntax

jsonobject.getString( keyStr )

Description

Returns the string value associated with a specified key.

Return type

STRING

Parameters

Parameter Description Data type

keyStr

The key whose value to return

STRING