The JSONParser object provides the ability to load the JSON-formatted data from a string or from a TXT file into a JSON object.
Note
This object cannot be referenced in .NET Web Service and .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. |
JSONParser 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 |
JSONParser function |
Datatype returned |
Description |
---|---|---|
ClassName in PowerScript Reference |
String |
Returns the name assigned to the object |
GetChildCount in PowerScript Reference |
Long |
Gets the child item count. |
GetChildItem in PowerScript Reference |
Long |
Gets the child item handle. |
GetChildKey in PowerScript Reference |
String |
Gets the key name of child item. |
GetContextService in PowerScript Reference |
Integer |
Creates a reference to a context-specific instance of the specified service. |
GetItemArray in PowerScript Reference |
Long |
Gets the handle value of the child array item. |
GetItemBlob in PowerScript Reference |
Blob |
Gets the blob value of the item. |
GetItemBoolean in PowerScript Reference |
Boolean |
Gets the boolean value of the item. |
GetItemDate in PowerScript Reference |
Date |
Gets the date value of the item. |
GetItemDateTime in PowerScript Reference |
DateTime |
Gets the datetime value of the item. |
GetItemNumber in PowerScript Reference |
Double |
Gets the double value of the item. |
GetItemObject in PowerScript Reference |
Long |
Gets the handle value of the child object item. |
GetItemString in PowerScript Reference |
String |
Gets the string value of the item. |
GetItemTime in PowerScript Reference |
Time |
Gets the time value of the item. |
GetItemType in PowerScript Reference |
JSONItemType (enumerated) |
Gets the type of item. Values are: JsonStringItem! -- Type of the JSON node whose key value pair is a string, such as "name":"evan". JsonNumberItem! -- Type of the JSON node whose key value pair is a number, such as "id":1001. JsonBooleanItem! -- Type of the JSON node whose key value pair is a boolean, such as "sex":true. JsonNullItem! -- Type of the JSON node whose key value pair is null, such as "remark": null. JsonObjectItem! -- Type of the JSON node whose key value pair is an object, such as "date_object":{"datetime":7234930293, “date”: "2017-09-21", "time": "12:00:00"}. JsonArrayItem! -- Type of the JSON node whose key value pair is an array, such as "department_array":[999999, {"name":"Website"}, {"name":"PowerBuilder"}, {"name":"IT"}]. |
GetParent in PowerScript Reference |
PowerObject |
Returns a reference to the name of the parent object |
GetRootItem in PowerScript Reference |
Long |
Gets the root item handle. |
LoadFile in PowerScript Reference |
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". |
LoadString in PowerScript Reference |
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". |
PostEvent in PowerScript Reference |
Boolean |
Adds an event to the end of the message queue for the object |
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 |