Hosted tool
Validate JSON
Live
Validate JSON locally against a supplied schema.
utilities.json_validateversion 1
Price
0.01
credits per call
Compute only: upstream charges are not included in this price.
Availability
Live
Configured and callable with a valid key.
Access
Live
Category Utilities
Input
{
"additionalProperties": false,
"properties": {
"json": {
"maxLength": 65536,
"type": "string"
},
"schema": {
"maxLength": 8192,
"minLength": 1,
"type": "string"
}
},
"required": [
"json",
"schema"
],
"type": "object"
}Result
object<{valid:boolean,errors:array}>Default fields: valid errors
Limits
| Synchronous deadline | 15 s |
|---|---|
| Maximum result | 65,536 bytes |
| Result pages | 1 |
| Maximum upstream read | 1,048,576 bytes |
Example call
Provisional: the invoke contract ships with the execution lane
curl https://haidercode.ai/v1/tools/utilities.json_validate/invoke \
-H "Authorization: Bearer <HK_KEY>" \
-H "Content-Type: application/json" \
-H 'Idempotency-Key: json_validate-1' \
-d '{"arguments":{"json":"…","schema":"…"},"max_credits":"0.05"}'Bound every paid call with max_credits, and repeat the same Idempotency-Key to recover a result rather than pay twice.