{"uid":"cap_AECv-xTjUF5bye09E58ve","slug":"json-validate-format-fc93a950","name":"json-validate-format","description":"JSON validator and formatter: parses the text, reports the error with position if invalid, otherwise returns pretty-printed and minified versions, the top-level type, key count, depth and size. Fix agent-generated JSON fast. $0.01 per call.","url":"https://intel.rallylive.ca/data/json-validate","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_W6_4KhXlJ2jrUoBXbHrhE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON string, reports parse errors with position, and returns pretty-printed and minified versions along with structural metadata like type, key count, depth, and size.","exampleAgentPrompt":"Can you validate this JSON for me and tell me if it's valid — and if not, where the error is? Also give me back a pretty-printed version and let me know the top-level type, how many keys it has, and how deep it is: {\"name\":\"Alice\",\"age\":30,\"address\":{\"city\":\"Toronto\"}}","exampleUseCases":[{"title":"Debug agent-generated JSON output","prompt":"This JSON my pipeline generated looks broken — can you check it for errors, tell me where the problem is, and show me a corrected pretty-printed version? Here it is: {\"items\":[{\"id\":1,\"value\":\"foo\"},{\"id\":2,\"value\":}]}"},{"title":"Inspect JSON structure before API submission","prompt":"Before I send this config JSON to the API, can you validate it and tell me the top-level type, total key count, and how deeply nested it is? Here's the JSON: {\"config\":{\"timeout\":30,\"retries\":3,\"endpoints\":[\"https://a.example.com\",\"https://b.example.com\"]}}"},{"title":"Minify JSON for storage or transmission","prompt":"I have a pretty-printed JSON blob I need to minify to save space — can you validate it and give me back the minified version along with its byte size?"}],"resultDescription":"Returns a validation status indicating whether the JSON is valid or not. If invalid, provides an error message with the position (line/column) of the parse failure. If valid, returns the pretty-printed JSON, the minified JSON string, the top-level type (object, array, string, etc.), the number of keys, the nesting depth, and the byte size of the payload.","failureModes":["Invalid or malformed input that cannot be parsed: returns error message with character/line position of failure","Empty input: likely returns a validation error indicating no content to parse","Non-JSON text submitted: returns parse error with position","Network timeout or service unavailability: HTTP 5xx response","Extremely large JSON payload may be rejected or time out"],"whenToPreferThis":"Choose this endpoint when you need to validate, format, or structurally inspect a JSON string in a single call — especially useful for catching and locating syntax errors in agent-generated JSON before downstream use. Prefer it over manual parsing when you also need structural metadata (depth, key count, size) alongside both pretty and minified output in one shot. It is purpose-built for the agentic workflow case of quickly fixing or auditing JSON without spinning up a local parser.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:02.713Z","isFirstParty":false}