The JSON node retrieves a document from the internet or a local file location and converts it into a Presence Data Table after applying rules.
For further information about JSON, please visit http://json.org
Example JSON Document and resulting Presence Data Table
Here is an example of an incoming JSON Document:
And here is the resulting (outgoing) Presence Data Table:
Using JSON Nodes in your Task
To include a JSON Query Node in your task, simply drag the JSON node from the Task Elements Toolbox (under Data Access) into the Task Edit View.
You will then see the introduction panel where you can enter a name and a description for the node:
Click next to show the Documents Panel. This is where you specify a live and test document and select which resulting values you would like to include in your outgoing table:
Live JSON Document
This is the location of the document that will be used when the JSON node runs as part of a Task, or during testing if no Test document has been specified.
Test JSON Document
This is the location of the document that will be used in the test environment. If not specified, the live document will be used.
Once the test document (or live document if there is no test document) has been configured, click the "Update" button to retrieve the file.
The JSON Response window shows the JSON document that was retrieved.
This shows a list of Data Table columns, which are derived from the JSON keys and objects. Click the checkboxes next to the column names to have that value included in your outgoing Data Table. Click "Select All" to choose all available columns, or "Deselect All" to choose none.
This panel allows you to override the default column names. Two lists are displayed, the full JSON Paths on the left and the derived column aliases on the right. Double click on an alias to change it, or select one and click "Set Selected" button below.
To revert to the default alias for the selected column click "Clear Selected". To revert all columns back to their defaults click "Clear All".
This Panel allows you to restrict the resulting records according to conditions. This uses the standard [Rules] procedure of dragging and dropping columns / variables into a rules tree. As well as using variables and columns from your previous nodes, you can also use columns from the current json object to allow you to match up different parts of the document.
This panel inspects the document retrieved in the Documents Panel, converts it into a Presence Data Table, applies the rules specified in the Conditions Panel, then displays it. Note that the document will not be retrieved from the server or disk at this time. If you make changes to the document itself you must refresh it in the Documents Panel before running the test to see the changes.
Click the "Run Test" button to perform the test. To clear the current results table, click "Clear Results".