This topic covers previous (pre-9.7) implementations of the JSON Assertor tool, which lets you place assertions on different elements in a JSON message. The previous implementations are deprecated: any existing tools will continue to work, but all new JSON Assertors you add will use the new implementation.

For details on the current tool implementation, see JSON Assertor.

Sections discussing the deprecated tool include:

Understanding JSON Assertor

The JSON Assertor is used to enforce the correctness of data in a JSON message. It enables you to introspect into individual elements in JSON messages and check whether they meet expectations. 

The JSON Assertor can be chained against any tool that communicates a JSON Message. It is most commonly connected with the Messaging Client and REST Client tools.

Configuring JSON Assertor

The JSON Assertor consists of three main tabs:

To use the JSON Assertor, complete the following:

  1. Select a project tree node and click Add Output. The Add Output wizard opens.
  2. In the Add Output wizard, select Request / Response > Traffic from the left GUI pane, select JSON Assertor from the right GUI pane, then click Finish. A JSON Assertor node is added underneath the selected node.
  3. Click Add in the JSON Assertor’s Configuration tab. The Select Assertion wizard opens.
  4. Select an assertion type. The following is a brief summary of the available types of Assertions.
  5. Click Next. A tree view displays.
  6. Select the element that you want this assertion to check and click Finish.

You may add additional assertions to apply to the message by clicking Add in the Configuration tab.

If you later want to modify the element referenced by an assertion, click Change Element at the bottom right of the Configuration tab. This opens a dialog that lets you graphically or manually edit the given element.