Converts a JSON string to XML.
For example, the JSON below contains multiple root nodes and will not be accepted by this function;
{
"firstName": "John",
"lastName": "Smith",
"isActive": true,
"age": 27,
"address":
{ "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100" }
,
"phoneNumbers": [
{ "type": "home", "number": "212 555-1234" }
,
{ "type": "office", "number": "646 555-4567" }
,
{ "type": "mobile", "number": "123 456-7890" }
],
"children": [],
"spouse": null
}
SppJSONToXml([JSON Data])
Where:
JSON Data is JSON data as text.
| Rule | Result | Meaning |
|---|---|---|
| SppJsonToXml(DWVariableLoadedJSON) | <?xml version="1.0" standalone="no"?><root><company id="1"> <name>Google</name><url>http://www.google.com</url> </person><company id="2"><name>Yahoo</name> <url>http://www.yahoo.com</url></person></root> | Converts the loaded JSON data to XML. |
See also: