ph_jsontoxml PowerHome formula function
Description
Converts JSON data to equivalent
XML data
Syntax
ph_jsontoxml ( as_json )
Argument | Description |
as_json | String. A string containing properly formatted JSON data |
Return value
String. Returns the supplied JSON
converted
into XML data
Usage
Use this function to convert JSON data to
XML data. The conversion is done using a C# JsonConvert object
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_jsontoxml('{"people":[{"name":"John","age":31,"city":"New
York","phones":["4075551212","3215551212","8885551212"]}]}') -
Returns "<XMLROOT><people><name>John</name><age>31</age><city>New
York</city><phones>4075551212</phones><phones>3215551212</phones><phones>8885551212</phones></people></XMLROOT>"