JSONPackage object
The JSONPackage object provides the ability to merge data in a JSON
object or extract data from a JSON object. Merging and extracting can
occur at both the client side and the server side. The resulted JSON can
be posted from the client to the server via HTTPClient, or retrieved from
the server to the client via RESTClient.
The JSON string that can be loaded by the JSONPackage object must be
an object (cannot be an array) and the item must be a string, object, or
array.
Note
This object cannot be referenced in .NET Web Service and .NET
Assembly components, otherwise the component will fail to be
deployed.
Note
The data to be merged can be from DataWindow, DataStore,
DataWindowChild, or from an existing JSON. Composite, Crosstab, OLE 2.0,
and RichText DataWindows are unsupported.
Properties
JSONPackage property |
Datatype |
Description |
---|---|---|
Boolean |
A boolean value that specifies whether to ignore |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Events
JSONPackage event |
Occurs |
---|---|
When the object is created. |
|
When the object is destroyed. |
Functions
JSONPackage function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the |
|
Integer |
Deletes all of the keys. |
|
Boolean |
Checks if the key name exists. |
|
Integer |
Creates a reference to a context-specific instance |
|
Blob |
Gets the JSON blob data. |
|
String |
Gets the JSON string data. |
|
String |
Gets the key name. |
|
PowerObject |
Returns a reference to the name of the parent |
|
String |
Gets the value of the key. |
|
Long |
Gets the total number of keys. |
|
String |
Loads a JSON file. |
|
String |
Loads a JSON string. |
|
Boolean |
Adds an event to the end of the message queue for |
|
Integer |
Removes a key. |
|
Integer |
Saves the JSON data to the local |
|
Boolean |
Sets the value of the key. |
|
Integer |
Triggers a specific event in the object and |
|
Object |
Returns the type of the object. |