Contract Validation (Free Online Tool)

Enforce expected source-shape requirements before a pipeline transforms data

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Validate this order payload before transforming it.

{
"order_id": "ord_1049",
"customer": {
"name": "Maya Chen",
"email": "maya@example.com"
},
"items": [
{
"sku": "tee_black_m",
"qty": 2
}
],
"payments": [
{
"status": "paid",
"amount": 48
}
],
"tracking": {
"status": "delayed"
}
}
Output
1{
2 "order_id": "ord_1049",
3 "customer": {
4 "name": "Maya Chen",
5 "email": "maya@example.com"
6 },
7 "items": [
8 {
9 "sku": "tee_black_m",
10 "qty": 2
11 }
12 ],
13 "payments": [
14 {
15 "status": "paid",
16 "amount": 48
17 }
18 ],
19 "tracking": {
20 "status": "delayed"
21 }
22}

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses
  • Nested JSON
  • Arrays & objects

Example: input → output

Input / Output
Input
{
"order_id": "ord_1049",
"customer": {
"name": "Maya Chen",
"email": "maya@example.com"
},
"items": [
{
"sku": "tee_black_m",
"qty": 2
}
],
"payments": [
{
"status": "paid",
"amount": 48
}
],
"tracking": {
"status": "delayed"
Output
{
"order_id": "ord_1049",
"customer": {
"name": "Maya Chen",
"email": "maya@example.com"
},
"items": [
{
"sku": "tee_black_m",
"qty": 2
}
],
"payments": [
{
"status": "paid",
"amount": 48
}
],
"tracking": {
"status": "delayed"

Related tools

Advanced usage (optional)

Contract Validation

v1.0.0
Validation
objectarrayreversible

Description

Contract Validation

Validate that input matches the source shape a pipeline expects. This utility is a pipeline preflight guard, not a full JSON Schema validator.

Use onFail: block for API-safe execution, warn to continue with warning metadata, or skip to stop downstream execution and return the current input unchanged.

Configuration

NameTypeDefaultDescription
Required Pathsjson[]Array of required path rules. Each rule is { "path": "$.customer.name", "type": "string", "nonEmpty": true }. type is optional (string|number|boolean|object|array|null). nonEmpty is optional and valid only for arrays/strings — fails the rule when the array has length 0 or the string is empty/whitespace-only.
Already-Processed Pathsjson[]Array of path rules that indicate the input may already be transformed. Each rule is { "path": "$.customer_name" }.
On Failenumblockblock fails the run, warn continues with a warning, skip stops downstream and returns the current input unchanged. block warn skip

Examples

AI Prompt
Validate this order payload before transforming it.
{
"order_id": "ord_1049",
"customer": {
"name": "Maya Chen",
"email": "maya@example.com"
},
"items": [
{
"sku": "tee_black_m",
"qty": 2
}
],
"payments": [
{
"status": "paid",
"amount": 48
}
],
"tracking": {
"status": "delayed"
}
}
Output
1{
2 "order_id": "ord_1049",
3 "customer": {
4 "name": "Maya Chen",
5 "email": "maya@example.com"
6 },
7 "items": [
8 {
9 "sku": "tee_black_m",
10 "qty": 2
11 }
12 ],
13 "payments": [
14 {
15 "status": "paid",
16 "amount": 48
17 }
18 ],
19 "tracking": {
20 "status": "delayed"
21 }
22}
Config
Required Paths
1[
2 {
3 "path": "$.customer.name",
4 "type": "string"
5 },
6 {
7 "path": "$.items",
8 "type": "array"
9 },
10 {
11 "path": "$.payments",
12 "type": "array"
13 }
14]
Already-Processed Paths
1[
2 {
3 "path": "$.customer_name"
4 },
5 {
6 "path": "$.total_amount"
7 }
8]
On Fail
block

API Usage

POST /api/v1/utilities/validation.contract
curl -X POST https://your-domain.com/api/v1/utilities/validation.contract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":{"order_id":"ord_1049","customer":{"name":"Maya Chen","email":"maya@example.com"},"items":[{"sku":"tee_black_m","qty":2}],"payments":[{"status":"paid","amount":48}],"tracking":{"status":"delayed"}}},"config":{"required":[{"path":"$.customer.name","type":"string"},{"path":"$.items","type":"array"},{"path":"$.payments","type":"array"}],"antiPatterns":[{"path":"$.customer_name"},{"path":"$.total_amount"}],"onFail":"block"}}'
Response
1{
2 "order_id": "ord_1049",
3 "customer": {
4 "name": "Maya Chen",
5 "email": "maya@example.com"
6 },
7 "items": [
8 {
9 "sku": "tee_black_m",
10 "qty": 2
11 }
12 ],
13 "payments": [
14 {
15 "status": "paid",
16 "amount": 48
17 }
18 ],
19 "tracking": {
20 "status": "delayed"
21 }
22}