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

SaveToFile – PB Docs 2022 – PowerBuilder Library

SaveToFile – PB Docs 2022

SaveToFile

PowerScript function

Description

Saves the JSON data to the local file.

Applies to

JSONGenerator and JSONPackage

Syntax

Argument

Description

objectname

The name of the JSONGenerator or JSONPackage object whose
data you want to save to the file.

FileName

A string whose value is the file full name.

e (optional)

Character encoding of the resulting blob.

Values are: EncodingANSI!, EncodingUTF8!, EncodingUTF16LE!
(default), and EncodingUTF16BE!.

Return value

Integer.

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

Examples

This example generates the following JSON string and saves to
d: est.json:

{ “string”: “string”, “long”: 100, “boolean”: true, “datetime”:
“2017-09-21 12:00:00”, “blob”: “dABoAGkAcwAgAGkAcwAgAGIAbABvAGIA”,
“remark”: null }

This example packages the data of the DataWindow, DataStore, and
DataWindowChild control and then saves the data to
D: empjson.txt.


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