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 / String functions
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 the content of a JSON variable to a JSON string.
New in version 2024
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Example
Personne is JSON
Personne.Nom = "DUPONT"
Personne.Prenom = "Michel"
// Affiche: { "Nom":"DUPONT", "Prenom":"Michel" }
Trace(JSONToString(Personne))
Syntax
<Result> = JSONToString(<JSON variable> [, <Options>])
<Result>: Character string
JSON string resulting from the conversion of the JSON variable. This string is in UTF8 format.
In case of failure, the ErrorOccurred variable is set to True and ErrorInfo returns the details of the error.
<JSON variable>: JSON variable
Name of the JSON variable to be converted to a JSON string.
<Options>: Optional integer
JSON string formatting option:
psdFormattingGenerates a JSON string with carriage returns and indentation.
psdMinifiedGenerates a minified JSON string, without carriage returns or spacing characters.

WEBDEV - Browser code This parameter is not available.
Component: wd290vm.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/05/2024

Send a report | Local help