# JSON Validation Function

## IS JSON

Test whether a JSON expression includes valid data.

### Syntax

```
<expr> IS [ NOT ] JSON
       [ { VALUE | ARRAY | OBJECT | SCALAR } ]
       [ { WITH | WITHOUT } UNIQUE [ KEYS ] ]
```

### Description

The `IS JSON` is a variant of IS predicate that checks whether an expression contains valid JSON data, with optional constraints on JSON type (VALUE, ARRAY, OBJECT, SCALAR) and key uniqueness.

### Example

```
SELECT '{"a": 42}' IS JSON OBJECT;
```

**Output**

```
+----------------------------+
| '{"a": 42}' IS JSON OBJECT | 
+----------------------------+
|                           1| 
+----------------------------+
```

## See Also

* [IS JSON (Comparison Operator)](/docs/server/reference/sql-structure/operators/comparison-operators/is-json.md) for details, including syntax and examples.


---

# 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://mariadb.com/docs/server/reference/sql-functions/special-functions/json-functions/json-validation-function.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.
