Skip to main content
POST
/
v2
/
evaluators
/
execute
/
json-validator
Execute json-validator evaluator
curl --request POST \
  --url https://api.traceloop.com/v2/evaluators/execute/json-validator \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "text": "{\"name\": \"John\", \"age\": 30}"
  },
  "config": {
    "enable_schema_validation": true,
    "schema_string": "{}"
  }
}
'
{
  "is_valid_json": true
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Body

application/json

Request body

input
object
required
config
object

Response

OK

is_valid_json
boolean
Example:

true