Nested structures
Convert nested objects, arrays and primitive values while preserving document hierarchy.
Data Conversion · REST API
Convert structured JSON into XML and parse XML documents into JSON through two dedicated REST endpoints.
Free tier available. Both endpoints require a JWT Bearer Token.
Convert nested objects, arrays and primitive values while preserving document hierarchy.
Represent XML attributes with @attribute and text nodes with #text.
Choose XML array layout, stabilize repeated elements as JSON arrays and optionally strip namespace prefixes.
Send a valid JSON object or array. A single top-level property becomes the XML root; multiple properties or a top-level array generate a synthetic root element.
Endpoint
POST
/api/v1/convert/data/json-to-xml
Input: application/json · Output: application/xml
Input
{
"book": {
"@category": "learning",
"title": "Learning XML",
"author": "Team DevHub"
}
}
Output
<book category="learning">
<title>Learning XML</title>
<author>Team DevHub</author>
</book>
| Parameter | Default | Description |
|---|---|---|
arrayMode |
FLAT |
FLAT repeats the element name; WRAPPED creates a parent with item children. |
Send a well-formed XML document as raw text. The root element is retained as the top-level JSON key; repeated sibling elements become arrays.
Endpoint
POST
/api/v1/convert/data/xml-to-json
Input: text/plain · Output: application/json
Input
<book category="learning">
<title>Learning XML</title>
<author>Team DevHub</author>
</book>
Output
{
"book": {
"@category": "learning",
"title": "Learning XML",
"author": "Team DevHub"
}
}
| Parameter | Default | Description |
|---|---|---|
forceArray |
false |
Stabilize potentially repeated elements as JSON arrays, even when one occurrence is present; singular elements remain unchanged. |
stripNamespaces |
false |
Remove namespace prefixes from element and attribute names, discarding namespace URI information. |
Transform JSON application data into XML for legacy integrations and XML-driven workflows.
Convert XML responses into structured JSON for REST applications, SDKs and frontend processing.
Browse the API catalog or consult interactive documentation for request and response details.