--- title: "convert XML to JSON()" slug: "basic-xml-to-json" updated: 2026-08-17T12:53:00Z published: 2026-08-17T12:53:00Z canonical: "docs.lobstersoftware.com/basic-xml-to-json" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # convert XML to JSON() This function converts the text of an XML file or an XML DOM object into the text of a JSON file. ## Parameters | Parameter | Description | | --- | --- | | a | The text of an XML file or the name of an XML DOM object, see function [parse XML()](/v1/docs/en/xml-parse-xml). See also parameter **b**. | | b | (option) "true", if an XML DOM object was specified in parameter **a**. Default: "false". | | c | (optional) "true" to format the JSON text (pretty format). Default: "false". | ## Example Assume the following XML file. ```xml article@pos 1 article@pos 2 ``` This will result in the following JSON file. ```json {   "Order":{      "date":"today",      "line":[         {            "product":{               "pos":"1",               "ean":"0815",               "amount":"2.0",               "vat":"19%",               "net":"100",               "description":"article@pos 1"            }         },         {            "product":{               "pos":"2",               "ean":"4711",               "amount":"1.0",               "vat":"19%",               "net":"145.34",               "description":"article@pos 2"            }         }      ],      "footer":{         "totalSum":"345.34",         "Text":"end of order"      }   } } ``` XML (Extensible Markup Language) is a structured text format for storing and exchanging data. Content is enclosed within freely definable tags such as `<order>`. XML is human-readable, machine-processable, and platform-independent. In the Lobster Data Platform, you can receive, parse, and generate XML data. JSON (**J**ava**S**cript **O**bject **N**otation) is a lightweight text format for data exchange. The Lobster Data Platform handles JSON in integration profiles, web resources, and API interfaces. Value resolvers convert JSON data to internal objects and vice versa.