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

LoadFile – PB Docs 2018 – PowerBuilder Library

LoadFile – PB Docs 2018

LoadFile

PowerScript function

Description

Loads a JSON file.

Required JSON format

  • For JSONParser object: The file content 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 of JSONObjectItem type (cannot be an
    array) and the values for the keys in the JSON can be any valid
    string, object, or array. For details, see JSON formats (required by
    JSONPackage object)
    .

Applies to

JSONParser and JSONPackage objects

Syntax

Argument

Description

objectname

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

FileName

A string whose value is the file full name. Only the
JSON or TXT file type is supported.

If the function is
called by JSONParser, the file content must be JSON
formatted.

If the function is called by JSONPackage,
the file content must be 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.

Examples

This example loads a JSON file into the JSONParser object:

This example loads data from the employees.txt file and then loads
the “d_employee” data into the DataWindow:

See also

LoadString


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