{"uid":"cap_ucw1T8rrhdbEsZe5S3Bfu","slug":"json-validate-format-223f8431","name":"JSON Validate/Format","description":"Validate, pretty-print (0-8 spaces), or minify JSON — json formatter/validator.","url":"https://conclavex402p04.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_SMJQ0CUlI0GLXN2SyFBOQ","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, pretty-prints (0–8 spaces), or minifies a JSON payload in a single call.","exampleAgentPrompt":"Can you check if this JSON is valid and pretty-print it with 2-space 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 want to make sure it's well-formed before I process it — can you validate it: {\"id\":123,\"status\":\"ok\",\"data\":null}?"},{"title":"Pretty-print config file for review","prompt":"Format this JSON config with 4 spaces of indentation so it's readable before I commit it to the repo: {\"host\":\"localhost\",\"port\":8080,\"debug\":false}."},{"title":"Minify JSON for network payload","prompt":"Take this JSON object and minify it into a single compact line to reduce payload size before I send it over the wire: {\"users\":[{\"id\":1,\"name\":\"Bob\"},{\"id\":2,\"name\":\"Sue\"}]}."}],"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 depending on the requested operation.","failureModes":["Invalid or malformed JSON input returns valid=false with no formatted output","Unsupported indentation level outside 0–8 range may return an error","Empty or missing body field causes a 400-level error","Non-JSON body type in the wrapper envelope causes schema validation failure"],"whenToPreferThis":"Choose this endpoint when you need a quick, paid-per-call JSON validation or formatting step in an automated pipeline — especially in x402-enabled agent workflows where you want a lightweight, stateless check without spinning up a local parser. Useful for verifying third-party payloads, normalizing JSON before storage, or compacting JSON for transmission.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:41:26.446Z","isFirstParty":false,"canonicalSlug":"json-validate-format-223f8431"}