> OctoPerf load testing - Json Assertion documentation page. Json Assertions execute JsonPath expressions and validate Json documents on server responses.

Source: https://api.octoperf.com/doc/design/edit-virtual-user/action-types/post-processors/json-assertion/

# Json Assertion

Json Assertion Post Processors lets you **check at runtime the HTTP responses satisfy conditions**, e.g.:

* The Json body contains a particular path,
* A node of the Json response has a particular value.

![json-assertion](https://api.octoperf.com/doc/design/edit-virtual-user/action-types/post-processors/img/json-assertion.png)

!!! note
    Assertions can be graphed in [bench reports](https://api.octoperf.com/doc/analysis/edit-bench-report/).

## Json Path

You can use our Json path selector to configure your expression from a node in the Json tree:

<video autoplay loop muted>
  <source src="https://api.octoperf.com/doc/design/edit-virtual-user/action-types/post-processors/img/json-assertion-path.webm" type="video/webm">
</video>


## Behavior

![json-assertion-advanced](https://api.octoperf.com/doc/design/edit-virtual-user/action-types/post-processors/img/json-assertion-behavior.png){ align=left }

### Negate pattern

Select **Yes** to reverse the search. This can be useful to check you **do not have** an error message.

### Assert value

Assert value allows you to also control the value of the node highlighted in the Json path field. This way you can control, not only that it exists but that it has the value you are looking for.

!!! tip
    Use **Expect null?** if the value is expected to be empty. Use **Is regex?** to use a regex expression in the value.

## Debug

Opening the debug panel allows you to quickly see the result of your assertion. Make sure to check it every time you make a significant change:

![response-assertion-debug](https://api.octoperf.com/doc/design/edit-virtual-user/action-types/post-processors/img/response-assertion-debug.png)
