PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV and WEBDEV 27 feature!
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Converts a JSON string to XML.
Example
let json = StringToJSON("
{"name": "TestName"
 ,"id": 2
 ,"true": True
 ,"list": [5,5,6,2,47]
}
")
 
let xml = JSONToXML(json)
Trace(xml..XMLSource)
 
// The result will be
// <document>
//   <name>TestName</name>
//   <id>2</id>
//   <true>true</true>
// <list>
//     <item>5</item>
//     <item>5</item>
//     <item>6</item>
//     <item>2</item>
//     <item>47</item>
//   </list>
// </document>
Syntax
<Result> = JSONToXML(<JSON to convert> [, <Converter>])
<Result>: xmlNode variable
xmlNode variable that corresponds to the converted JSON string.
<JSON to convert>: JSON variable
Name of the JSON variable to be converted.
<Converter>: Optional JSONXMLConverter variable
Name of the JSONXMLConverter variable that corresponds to the custom conversion standard to be applied.
Caution: This customization requires a good knowledge of XML.
If this parameter is not specified, a default standard will be used for the conversion: the default values of the JSONXMLConverter variable are used.
Component: wd270vm.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Esempio corretto
let json = StringToJSON("
{"nom" : "TestName"
,"id" : "2"
,"vrai" : "true"
,"liste" : [5,5,6,2,47]
}
")
let xml = JSONToXML(json)
Trace(xml..XMLSource)
Romanello GIUSEPPE
22 Dec. 2021