ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / JSON functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Converts a JSON string to XML.
Example
let json = StringToJSON("
{ "nom" : "TestName"
 ,"id" : 2
 ,"vrai" : "True"
 ,"liste" : [5,5,6,2,47]
}
")

let xml = JSONToXML(json)
Trace(xml..XMLSource)

// Le résultat affiché sera 
// <document>
//   <nom>TestName</nom>
//   <id>2</id>
//   <vrai>true</vrai>
//   <liste>
//     <item>5</item>
//     <item>5</item>
//     <item>6</item>
//     <item>2</item>
//     <item>47</item>
//   </liste>
// </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.
Warning: This customization requires a good knowledge of XML.
If this parameter is not specified, a default standard will be imposed during conversion: the default values of the JSONXMLConverter type variable are used.
Component: wd300xml.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

Last update: 05/14/2025

Send a report | Local help