Validate + canonicalize JSON
validate_jsonValidate a JSON instance against an optional JSON Schema and return RFC 8785 canonical JSON plus SHA-256. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/validate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instance": "<instance>"
},
"name": "validate_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | JSON Schema to validate instance against. Optional. If omitted, the instance is accepted and only canonicalized. | |
| instance | Yes | JSON value to validate. Any JSON type is accepted. | |
| canonicalize | No | If true (default), return RFC 8785 JCS canonical JSON, its SHA-256 hex digest, and byte length. |