# JSON validator

Check whether text is valid JSON and get the exact line and column of the first error.

- Endpoint: `POST https://setget.net/v1/tools/json-validate` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `json-validate`
- Page: https://setget.net/tools/json-validate

## Inputs

- `text` (required, string): The text to check.

## Example 1

```json
{"input":{"text":"{\"a\": 1}"}}
```

Result:

```json
{"valid":true,"type":"object","error":null}
```

## Example 2: A misspelt literal

```json
{"input":{"text":"{\"a\": tru}"}}
```

Result:

```json
{"valid":false,"type":null,"error":{"message":"Expecting value","line":1,"column":7}}
```
