Json Validate
Validate caller-supplied JSON against Forest bounded JSON Schema subset v1 before an agent trusts or forwards structured output. Returns deterministic machine-readable violations with stable paths; performs no network request, remote $ref resolution, regex evaluation, model inference or mutation.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
$0.001 / callPOST /json/validatex402 · Base
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- validate JSON against a schema before trusting a tool response
- check structured output fields and types before the next agent step
- verify an API payload contract without an LLM or network request
- reject malformed JSON payloads with machine-readable validation paths
What Forest guarantees
- caller-supplied JSON only; zero network, provider, persistence or model work
- supported schema keywords fail closed and unknown keywords are rejected
- no remote references or regular-expression pattern evaluation in subset v1
- schema depth/nodes, payload bytes, value work and violation output are hard bounded
- object properties are visited in deterministic sorted-key order
Boundaries
- full JSON Schema draft compliance, $ref resolution, formats, pattern regexes or conditional schemas
- semantic correctness of a payload beyond the declared supported schema subset
- repair, coercion, default insertion or mutation of caller data
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
{
"value": {
"id": 42,
"status": "ready"
},
"schema": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "integer"
},
"status": {
"enum": [
"ready",
"blocked"
]
}
},
"additionalProperties": false
}
}
Canonical paid endpoint
https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/json/validate
Related capabilities
- Json Diff — Deep-compare two caller-supplied JSON values with deterministic object-key ordering and explicit index-based array semantics. Returns bounded added, removed and changed paths with primitive before/after values when safe; performs no network request, model inference, persistence or mutation.
- Json Query — Extract one bounded value from caller-supplied JSON using a deterministic simple path such as items[2].name or $.data.id. Forest performs no network request or model inference, returns an explicit found flag, and supports only dot object keys plus numeric array indexes so lookup behavior stays predictable.
- Openapi Payload-validate — Validate one caller-supplied JSON request or response payload against the documented JSON schema for one exact OpenAPI or Swagger operation. Forest fetches only the supplied public specification, never invokes the described API operation, resolves only bounded local references, and reuses the same deterministic schema subset as json.validate.
- Mcp Changed — Auto-detect a public MCP endpoint era, fingerprint its complete normalized tools/list schema contract and optionally compare it with a caller-provided previous SHA-256 hash. Cosmetic descriptions are excluded so text-only edits do not trigger contract drift.
- Mcp Contract-check — Inspect one public MCP HTTP endpoint, auto-detect the stateless 2026-07-28 era or fall back to the legacy initialize lifecycle, then normalize tools/list schemas into a deterministic SHA-256 contract fingerprint. Forest never invokes an advertised tool or attempts authentication.
- Blob Decode — Identify and unwrap a bounded caller-supplied opaque string into readable JSON, text or binary evidence using deterministic local rules for JWT payloads, canonical Base64/Base64URL and gzip. Ambiguous hex/Base64 representations stop in auto mode; canonical hex and Brotli can be selected only through explicit bounded hints. JWT claims are decode-only and always marked unverified.