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

This object cannot be referenced in .NET Web Service and .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 in PowerScript Reference

Immediately before the Open event occurs in the window

Destructor in PowerScript Reference

Immediately after the Close event occurs in the window


Functions

JSONGenerator function

Datatype returned

Description

AddItemArray in PowerScript Reference

Long

Adds the child item of JSONArrayItem type.

AddItemBlob in PowerScript Reference

Long

Adds the child item of JSONStringItem type.

AddItemBoolean in PowerScript Reference

Long

Adds the child item of JSONBooleanItem type.

AddItemDate in PowerScript Reference

Long

Adds the child item of JSONStringItem type.

AddItemDateTime in PowerScript Reference

Long

Adds the child item of JSONStringItem or JSONNumberItem type.

AddItemNull in PowerScript Reference

Long

Adds the child item of JSONNullItem type.

AddItemNumber in PowerScript Reference

Long

Adds the child item of JSONNumberItem type.

AddItemObject in PowerScript Reference

Long

Adds the child item of JSONObjectItem type.

AddItemString in PowerScript Reference

Long

Adds the child item of JSONStringItem type.

AddItemTime in PowerScript Reference

Long

Adds the child item of JSONStringItem type.

ClassName in PowerScript Reference

String

Returns the name assigned to the object

CreateJSONArray in PowerScript Reference

Long

Creates the array as root item to initialize instance.

CreateJSONObject in PowerScript Reference

Long

Creates the object as root item to initialize instance.

GetContextService in PowerScript Reference

Integer

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

GetJSONBlob in PowerScript Reference

Blob

Gets the JSON blob data.

GetJSONString in PowerScript Reference

String

Gets the JSON string data.

GetParent in PowerScript Reference

PowerObject

Returns a reference to the name of the parent object

PostEvent in PowerScript Reference

Boolean

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

SaveToFile in PowerScript Reference

Integer

Saves the JSON data to the local file.

TriggerEvent in PowerScript Reference

Integer

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

TypeOf in PowerScript Reference

Object

Returns the type of the object