JsonSchema (Json Schema)

This component defines the schema, which includes the resulting output, configuration and queries properties, JSON entities, and actions.
Figure 28.   JsonSchema properties
Image

You add a schema to a station by dragging a JsonSchema from the palette to the Config folder in the Nav tree. From there, to access schema properties, expand the Config folder and double-click the schema.

Property Value Description
Output container Contains the generated JSON string.
Enabled true (default) or false Activates (true) and deactivates (false) use of the object (network, device, point, component, table, schedule, descriptor, etc.).
Status read-only Indicates if the network, device, point or component is active or inactive.
Fault Cause read-only Indicates the reason why a system object (network, device, component, extension, etc.) is not working properly (in fault). This property is empty unless a fault exists.
Last Updated read-only Reports when the schema was updated last.
Config folder Contains properties for customizing the schema.
Queries folder Contains the query ords.

root

This container holds JSON entities: objects, arrays, properties and bound properties.

Figure 29.   root Json Schema Object
Image

A separate topic documents each of type of object, array and property.

Buttons

These functions are available when you click a button and name to the right of the Output property on the schema Property Sheet.

Figure 30.   JSON Schema actions on the right side
Image
  • Generate requests a rebuild and update of schema output. For relative schemata, this evaluates the Base Query and publishes results.
  • Copy copies the selected JSON to the clipboard.
  • Clear Output sets the Out slot of this component to an empty string.
  • Output History displays a history of the most recent schema output values in a new tab. This information is useful to confirm output contents if the schema changes rapidly due to subscribed points, and to have timestamps show how frequently it changes.
  • Metrics reports information used to size and provision capacity as well as debug performance problems.
  • Indented Display toggles the Output display between the underlying JSON string (which does not have extraneous whitespace) and a syntax highlighted and indented version that is easier to understand. It defaults to the latter.

Actions

These actions are available when you right-click the JsonSchema node in the Nav tree.

  • Generate Json executes the JSON code.
  • Force Generate Json forces the generate action regardless of the current tuning settings.
  • Clear Cache discards the last known values of bindings and cached query results.
  • Clear Output sets the Out slot of this component to an empty string.
  • Execute Queries forces an immediate execution of all the schemas queries. You can link this action to some appropriate logic to trigger execution when needed.
  • Unregister And Unsubscribe All (relative schema only) unsubscribes the registration from any base items that the relative schema monitors for updates and removes cloud registration from all export-marked entities in the station.