{"uid":"cap_663xGFH3l5WXFCxVoxLwp","slug":"xml-to-json-converter-toolshed-lemon-agent-dev-0a382bb7","name":"XML to JSON Converter (toolshed.lemon-agent.dev)","description":"XML to JSON. POST an XML document; the response is JSON in fast-xml-parser's convention — attributes prefixed @_, text content under #text, and repeated sibling elements collapsed into an array (so an element appearing once is an object and twice is an array). Values stay strings; no type guessing. A document carrying a <!DOCTYPE> is refused, because internal entities are an expansion attack.","url":"https://toolshed.lemon-agent.dev/convert/xml-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":"string","maxLength":262144,"description":"the raw XML file as the request body, up to 256 KB"},"type":{"type":"string","const":"http"},"method":{"type":"string","const":"POST"},"bodyType":{"type":"string","const":"text"}},"additionalProperties":false},"output":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","const":"text"},"format":{"type":"string","const":"application/json","description":"the converted JSON file as the response body (application/json)"},"example":{"type":"string","description":"the sample request body above, converted — what a the converted JSON file as the response body (application/json) looks like"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dj45YNw6OM56E1MvycMDR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a raw XML document into JSON using fast-xml-parser conventions, with attributes prefixed @_, text content under #text, and repeated elements collapsed into arrays.","exampleAgentPrompt":"Convert this XML document to JSON for me — it's an RSS feed about 30 KB large, and I need the output in fast-xml-parser format with attributes as @_ keys and repeated elements collapsed into arrays.","exampleUseCases":[{"title":"SOAP API response normalization","prompt":"I got back a SOAP XML response from a legacy web service and need it as JSON so my downstream code can work with it — can you convert the XML to JSON for me?"},{"title":"RSS/Atom feed parsing","prompt":"Here's an RSS feed XML file, can you convert it to JSON so I can extract the article titles and links in my pipeline?"},{"title":"XML config file to JSON migration","prompt":"I have an old XML configuration file I need to migrate to JSON — please convert it, keeping the attributes and nested elements in fast-xml-parser format."}],"resultDescription":"A JSON object produced by fast-xml-parser conventions: XML attributes are prefixed with @_, text node content appears under #text, and sibling elements that repeat are collapsed into an array (single occurrence = object, multiple = array). All values remain strings with no type coercion. DOCTYPE-bearing documents are rejected to prevent entity expansion attacks.","failureModes":["Document contains <!DOCTYPE> declaration — refused to prevent XML entity expansion attacks","Payload exceeds 256 KB limit — request rejected","Malformed or non-parseable XML — parsing error returned","Empty body — missing required input field error","Content-type mismatch or encoding issues causing parse failure"],"whenToPreferThis":"Use this endpoint when you need a lightweight, predictable XML-to-JSON conversion following fast-xml-parser conventions without type guessing. It is ideal for processing SOAP responses, RSS/Atom feeds, XML config files, or any well-formed XML up to 256 KB. Avoid it if your document contains a DOCTYPE declaration, if you need type coercion (e.g. numbers parsed as integers), or if you need a different JSON mapping convention.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:05:08.007Z","isFirstParty":false,"canonicalSlug":"xml-to-json-converter-toolshed-lemon-agent-dev-0a382bb7"}