XML ↔ JSON
xml_jsonConvert XML to JSON, or a JSON object back to XML.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "xml_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | A JSON object to turn into XML. Use this instead of text when you already have an object. | |
| root | No | Name of the root XML element when converting to XML. Default "root". | |
| text | No | The XML text to convert to JSON, or the JSON text to convert to XML. | |
| compact | No | Set to false to keep the full XML tree with attributes listed. Default true, which gives short JSON. | |
| direction | No | Which way to convert: "to-json", "to-xml", or "auto" (the default, which guesses). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| tool | Yes | ||
| result | Yes |