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

LoadString – PB Docs 2021 – PowerBuilder Library

LoadString – PB Docs 2021

LoadString

PowerScript function

Description

Loads a JSON string to the JSONParser or JSONPackage objects.

Applies to

JSONParser and JSONPackage

Required JSON format

  • For JSONParser object: The string that can be loaded by the
    JSONParser object must be JSON-formatted.

  • For JSONPackage object: The file content that can be loaded by
    the JSONPackage object must be an object which contains a set of
    key/value pairs where key is the name of a JSONObjectItem-type object
    (corresponding to the data being added into the package, such as
    “d_department” and “d_employee_syntax”) and the value for the key can
    be a string, object, or array in the following formats: plain JSON, or
    DataWindow JSON.

    Here is the structure of this JSON format:

    Here is an example of this JSON format:

Syntax

Argument

Description

objectname

The name of the JSONParser or JSONPackage object to which
the JSON string will be loaded.

JsonData

(For JSONParser object) A JSON-formatted string.

(For JSONPackage object) The JSON data of JsonObjectItem
type.

Return value

String.

Returns the empty string (“”) if it succeeds and the error message
if an error occurs. If any argument’s value is null, the method returns
null.

Usage

If a string is already loaded by this function, calling this
function again will clean up the original string and then load the new
string.

Examples

This example loads a JSON string into the JSONParser object:

This example gets the data from the server and then loads the
“d_employee” data to the DataWindow:

See also

LoadFile


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