{"uid":"cap_Al9xG1mbiZBToIoqB_PWE","slug":"json-validate-format-63db5c8a","name":"JSON Validate/Format","description":"Validate, pretty-print (0-8 spaces), or minify JSON — json formatter/validator.","url":"https://conclavex402.pythonanywhere.com/u/json?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"pathParams":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"valid":true,"formatted":"{\n  \"a\": 1\n}"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yHQSz1icxake_q_32JrYu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates JSON for correctness, pretty-prints it with configurable indentation (0–8 spaces), or minifies it into compact form.","exampleAgentPrompt":"Can you check if this JSON is valid and pretty-print it with 4 spaces of indentation: {\"name\":\"Alice\",\"age\":30,\"active\":true}?","exampleUseCases":[{"title":"Validate API response payload","prompt":"I just got this JSON back from an external API and I'm not sure if it's well-formed — can you validate it and tell me if there are any errors? Here it is: {\"user\":{\"id\":42,\"name\":\"Bob\",\"roles\":[\"admin\",\"editor\"]}}"},{"title":"Pretty-print config file for readability","prompt":"Can you reformat this minified JSON config with 2 spaces of indentation so my team can read it easily? {\"host\":\"localhost\",\"port\":5432,\"db\":\"prod\",\"ssl\":true}"},{"title":"Minify JSON before embedding in request","prompt":"I need to shrink this JSON down to its smallest form before I embed it in a URL parameter — can you minify it and remove all the whitespace? {\n  \"key\": \"value\",\n  \"count\": 10\n}"}],"resultDescription":"Returns a JSON object with a 'valid' boolean indicating whether the input is valid JSON, and a 'formatted' string containing the pretty-printed or minified result. If invalid, an error description is typically included.","failureModes":["Malformed input JSON causes validation failure with an error message rather than a formatted result","Missing required 'input' field returns a 400-level error","Indentation level outside 0–8 range may be rejected or clamped","Non-JSON body type may cause deserialization errors","Payment failure or insufficient funds returns a 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call JSON validation or formatting step inside an automated pipeline without standing up your own JSON tooling. Ideal for agents that need to verify third-party data payloads before processing them, or to normalize JSON formatting for human review or downstream storage. Its low per-call cost ($0.005 USDC) makes it practical for high-frequency formatting tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:46:05.636Z","isFirstParty":false,"canonicalSlug":"json-validate-format-63db5c8a"}