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

JSONGenerator object – PB Docs 2021 – PowerBuilder Library

JSONGenerator object – PB Docs 2021

JSONGenerator object

The JSONGenerator object provides the ability to construct the JSON
objects with the root item being either an object or an array. It supports
adding values, objects, or arrays to the constructed JSON object.

Note

It is not recommended to use this object to process large data (20
MB or 100,000 data rows can be considered as large data based on our
tests), because this object will call a third-party library which is
memory intensive.

Note

This object cannot be referenced in .NET Web Service or .NET
Assembly components, otherwise the component will fail to be
deployed.

Properties

JSONGenerator property

Datatype

Description

ClassDefinition

PowerObject

An object of type PowerObject containing
information about the class definition of the object or
control.

Events

JSONGenerator event

Occurs

Constructor

Immediately before the Open event occurs in the
window

Destructor

Immediately after the Close event occurs in the
window

Functions

JSONGenerator function

Datatype returned

Description

AddItemArray

Long

Adds a child item of JSONArrayItem
type.

AddItemBlob

Long

Adds a child item of JSONStringItem
type.

AddItemBoolean

Long

Adds a child item of JSONBooleanItem
type.

AddItemDate

Long

Adds a child item of JSONStringItem
type.

AddItemDateTime

Long

Adds a child item of JSONStringItem or
JSONNumberItem type.

AddItemNull

Long

Adds a child item of JSONNullItem
type.

AddItemNumber

Long

Adds a child item of JSONNumberItem
type.

AddItemObject

Long

Adds a child item of JSONObjectItem
type.

AddItemString

Long

Adds a child item of JSONStringItem
type.

AddItemTime

Long

Adds a child item of JSONStringItem
type.

ClassName

String

Returns the name assigned to the
object.

CreateJSONArray

Long

Creates an array as root item to initialize
instance.

CreateJSONObject

Long

Creates an object as root item to initialize
instance.

GetContextService

Integer

Creates a reference to a context-specific instance
of the specified service.

GetJSONBlob

Blob

Gets the JSON blob data.

GetJSONString

String

Gets the JSON string data.

GetItemByPath

Long

Gets the handle of the item.

GetPathByItem

String

Gets the path of the item.

GetParent

PowerObject

Returns a reference to the name of the parent
object.

ImportString

Long

Imports a JsonObjectItem item from a JSON
string.

ImportFile

Long

Imports a JsonObjectItem item from a JSON
file.

PostEvent

Boolean

Adds an event to the end of the message queue for
the object.

SaveToFile

Integer

Saves the JSON data to the local
file.

TriggerEvent

Integer

Triggers a specific event in the object and
executes the script for the event.

TypeOf

Object

Returns the type of the object.


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