# JSON Partial Matcher

JSON Partial matching will match if you provide snippet of JSON that exists within the incoming request payload.

Unlike a JSON matcher which does the full comparison matching of two JSON documents (the JSON in the request body with the JSON you have specified as the matcher value), the JSON Partial matcher evaluates if the matcher value is a subset of the incoming JSON document.

The matcher ignores any absent fields and lets you match only the part of JSON document you care about.

### JSON Partial Matching example:

| **Matcher value**                                                             | **Positive match payload**                                                                                                | **Non match payload**                                          |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| {"surname": "Doe"}                                                            | <p>{</p><p>"name": "John",</p><p>"surname": "Doe"</p><p>}</p>                                                             | <p>{</p><p>"name": "John",</p><p>"surname": "Ross"</p><p>}</p> |
| <p>{</p><p>"name": "John",</p><p>"surname": "Doe",</p><p>"age":30</p><p>}</p> | <p>{</p><p>"people": \[</p><p>{</p><p>"name": "John",</p><p>"surname": "Doe",</p><p>"age": 30</p><p>}</p><p>]</p><p>}</p> | <p>{</p><p>"name": "John",</p><p>"surname": "Doe"</p><p>}</p>  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloud.hoverfly.io/create-simulations/configuring-request-matchers/json-request-matchers-on-the-body/json-partial-matcher.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
