{"uid":"cap_tsvcvOdmoZbGaque_R-eV","slug":"402utils-yaml-json-converter-0fcd175c","name":"402utils YAML↔JSON Converter","description":"Convert between YAML and JSON in one call. to:\"json\" parses a YAML document (config files, docker-compose, Kubernetes manifests, CI pipelines) into a plain JSON value; to:\"yaml\" renders any JSON value as clean block-style YAML. Hardened: safe core schema (tags like !!js/function never execute), alias bombs rejected, one document per call, parse errors return line/column. YAML input up to 2 MB UTF-8.","url":"https://402utils.com/v1/yaml?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"enum":["json","yaml"],"type":"string","description":"Target format: \"json\" parses YAML text, \"yaml\" emits YAML text."},"input":{"description":"The value to convert. With to:\"json\": a single YAML document as a string, max 2 MB UTF-8. With to:\"yaml\": any JSON value; a string is first parsed as JSON text."}}},"responseSchema":{"type":"json","example":{"result":{"services":{"web":{"image":"nginx:1.29","ports":["80:80"]}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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":{"p10Cents":"0.1000","medianCents":"0.1000","p90Cents":"0.1000","minCents":"0.1000","maxCents":"0.1000","p95Cents":"0.1000","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6WfldH8tpLNG1u4Mil2P-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts between YAML and JSON bidirectionally: parses YAML documents into JSON or renders JSON values as clean block-style YAML","exampleAgentPrompt":"Convert this docker-compose YAML to JSON for me: 'version: \"3\" services: web: image: nginx ports: [\"80:80\"]' — parse it to JSON.","exampleUseCases":null,"resultDescription":"A JSON value (when to=json) representing the parsed YAML document, or a YAML-formatted string (when to=yaml) rendering the input JSON in clean block style. On parse error, returns the error with line and column number indicating where parsing failed.","failureModes":["YAML parse error with line/column info returned when input is malformed YAML","Input exceeds 2 MB UTF-8 limit — request rejected","Dangerous YAML tags (e.g. !!js/function) rejected by safe core schema","Alias bomb / deeply nested anchor expansion rejected","Multiple YAML documents in a single call rejected","Invalid to enum value returns validation error"],"whenToPreferThis":"Use this endpoint when you need a hardened, safe YAML↔JSON conversion that explicitly rejects dangerous tags and alias bombs — ideal for processing untrusted config files like docker-compose, Kubernetes manifests, CI pipeline files, or Helm charts. Prefer this over custom parsing code when security (no code execution from tags) and error detail (line/column on failure) matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:42:44.221Z","isFirstParty":false,"canonicalSlug":"402utils-yaml-json-converter-0fcd175c"}