ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / JSON functions
  • Encoding
  • Remark
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Checks the validity of a JSON string.
New in SaaS
WEBDEV - Browser code This function is now available in browser code.
Note: This function is only available from WINDEV Suite SaaS 2025 - Update 1.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
Example
// Check if the JSON string is valid 
IF JSONValid(sJSON) THEN
	// Yes => Initialize JSON variable
	oJSON is JSON = StringToJSON(sJSON)
	...
END
Syntax
<Result> = JSONValid(<JSON string>)
<Result>: Boolean
  • True if the JSON string is valid,
  • False otherwise. If an error occurs, use ErrorInfo for more details on the error.
<JSON string>: Character string
String containing the JSON data (7-bit ASCII + JSON or UTF-8 encoding).
Remarks

Encoding

The encoding used corresponds to the JSON standard:
  • 7-bit ASCII encoding for the first 128 characters, i.e., unaccented characters
  • JSON encoding for other characters: "\u" followed by the character code in 4-byte hexadecimal format. For example, the "é" character (ASCII code 233, hexadecimal code E9) would be encoded as "\u00E9".
New in SaaS
WEBDEV - Browser code

Remark

Comments are not supported during JSON verification in browser code.
Component: wd300vm.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/30/2025

Send a report | Local help