Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetItemObjectJSONString – PB Docs 2022 – PowerBuilder Library

GetItemObjectJSONString – PB Docs 2022

GetItemObjectJSONString

PowerScript function

Syntax 1: GetItemObjectJSONString ( ParentItemHandle, Key )

Syntax 2: GetItemObjectJSONString ( ItemPath )

Syntax 3: GetItemObjectJSONString ( ItemHandle )

Syntax 1

Description

Gets the string value of the object item.

Applies to

JSONParser
objects

Syntax

Argument

Description

objectname

The name of the JSONParser object whose child object
item you want to obtain.

ParentItemHandle

A long whose value is the handle of the parent item of
JsonObjectItem type.

Key

A string whose value is the key of the child item of
JsonObjectItem type.

Return value

String.

Returns the string value of the item if it succeeds and -1 if an
error occurs. If any argument’s value is null, the method returns null.
If an error occurs, the method throws the exception.

Usage

If the item value is null, this function will throw an error,
therefore, it is recommended that before executing this function, call
GetItemType to check if the item
value is null. See example
2
in GetItemArray.

Examples

This example gets the string value of the “date_object” object
according to the key name:

Syntax 2

Description

Gets the string value of the object item.

Applies to

JSONParser
objects

Syntax

Argument

Description

objectname

The name of the JSONParser object whose child object
item you want to obtain.

ItemPath

A string whose value is the path of the item of
JsonObjectItem type. If there is a multi-dimensional array,
use the number to indicate the order of the array elements. If
a key name contains “/”, use the escape character “~~/” to
replace “/”.

Return value

String.

Returns the string value of the item if it succeeds and -1 if an
error occurs. If any argument’s value is null, the method returns null.
If an error occurs, the method throws the exception.

Usage

If the item value is null, this function will throw an error,
therefore, it is recommended that before executing this function, call
GetItemType to check if the item
value is null. See example
2
in GetItemArray.

Examples

This example gets the string value of the “date_object” object
according to its item path:

Syntax 3

Description

Gets the string value of the object item.

Applies to

JSONParser
objects

Syntax

Argument

Description

objectname

The name of the JSONParser object whose child object
item you want to obtain.

ItemHandle

A long specifying the item handle which is
JsonObjectItem type.

Return value

String.

Returns the string value of the item if it succeeds. If any
argument’s value is null, the method returns null. If an error occurs,
the method throws the exception.

Usage

If the item value is null, this function will throw an error,
therefore, it is recommended that before executing this function, call
GetItemType to check if the item
value is null. See example
2
in GetItemArray.

Examples

This example gets the string value of the “datetime” object
according to its item handle:

See also

GetItemArray

GetItemArrayJSONString

GetItemBlob

GetItemBoolean

GetItemByPath

GetItemDate

GetItemDateTime

GetItemDecimal

GetItemNumber

GetItemObject

GetItemString

GetItemTime

GetItemType

GetNumberType


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x