WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

assert:jsonpath

Importing assert:jsonpath into an XUnit testlist provides the assert which can be used to apply boolean assertions about JSON structures.

Use

Import into an XUnit testlist...

<testlist>
  <import>assert:jsonpath</import> ... Your tests ...
</testlist>

To apply a JSON path assertion to a test result do this...

<test>
  <request>
    <identifier>res:/my/json/test/request</identifier>
  </request>
  <assert>
    <jsonpath>$.root</jsonpath>
    < !--Assert that JSON has the form { "root" : ... }-->
  </assert>
</test>