The JSONParser object provides the ability to load the JSON-formatted data from a string or from a TXT file into a JSON object, and then parse the JSON object to get the child item count, get the handle, key name or value of any specified item, etc.
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.
JSONParser property |
Datatype |
Description |
---|---|---|
ClassDefinition |
PowerObject |
An object of type PowerObject containing information about the class definition of the object or control. |
Boolean |
Specifies whether the getting item function returns a null value when error occurs. |
JSONParser event |
Occurs |
---|---|
Immediately before the Open event occurs in the window |
|
Immediately after the Close event occurs in the window |
JSONParser function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the object. |
|
Boolean |
Checks if the key name exists. |
|
Boolean |
Checks if the item path exists. |
|
Long |
Gets the child item count. |
|
Long |
Gets the child item handle. |
|
String |
Gets the key name of child item. |
|
Integer |
Creates a reference to a context-specific instance of the specified service. |
|
Long |
Gets the handle value of the child array item. |
|
String |
Gets the string value of the item whose type is array. |
|
Blob |
Gets the blob value of the item. |
|
Boolean |
Gets the boolean value of the item. |
|
Long |
Gets the handle of the item. |
|
Date |
Gets the date value of the item. |
|
DateTime |
Gets the datetime value of the item. |
|
Double |
Gets the double value of the item. |
|
Long |
Gets the handle value of the child object item. |
|
String |
Gets the string value of the child object item. |
|
String |
Gets the string value of the item. |
|
Time |
Gets the time value of the item. |
|
JSONItemType (enumerated) |
Gets the type of item. Values are:
|
|
JSONNumberType (enumerated) |
Gets the type of the number item. Values are:
|
|
PowerObject |
Returns a reference to the name of the parent object. |
|
Long |
Gets the root item handle. |
|
String |
Loads a JSON file. The JSON file cannot contain special characters such as ~r~n or ~t, otherwise, LoadFile will throw the error "Invalid encoding in string". |
|
String |
Loads a JSON string. The JSON string cannot contain special characters such as ~r~n or ~t, otherwise, LoadString will throw the error "Invalid encoding in string". |
|
Boolean |
Adds an event to the end of the message queue for the object. |
|
Integer |
Triggers a specific event in the object and executes the script for the event. |
|
Object |
Returns the type of the object. |