JsonPath (Json Path)

Selectors are components that take an inbound JSON message, apply some selection criteria to it, and set up the result an out slot. This might be a subset of the JSON. It could be, for example, the size of a message or the result of an aggregate function, such as the sum of a repeated value. This selector component allows data to be interactively located and extracted from JSON structures using a special notation to represent the payload structure.
Figure 80.   JsonPath properties
Image

You add this selector to a station by expanding Inbound > Selectors in the palette and dragging the JsonPath to a JSON message router node in the Nav tree.

In addition to the standard property (Enabled), these properties support the JsonPath.

Property Value Description
Last Result read-only Reports the results of the alarm acknowledgment to allow for logging or post-processing activity. Example output:

Unable to find messagge key:

Problem parsing messageType

Last Result Time read-only Reports when the handler ran last.
Last Input read-only Reports the last message routed to a component.
Status read-only Reflects the current status of the component.

Ok indicates the JSON processed successfully.

fault indicates the JSON did not process for any reason, such as invalid JSON or missing expected values in the JSON.

Out read-only Displays the result.
Path (JsonPath) text Defines the path.

Actions

These actions are available when you right-click on the JsonPath.

Figure 81.   JsonPath action buttons
Image
  • Route causes this component to process the String parameter and update the Out slot.
  • Run Last Input executes the last input again.
  • Clear Output sets the Out slot of this component to an empty string.