# WENCODEJSON

Updated: 9/28/2020, 10:32:47 PM
Created: 9/28/2020, 10:32:47 PM
Last Updated By: Peter Schellenbach
Read Time: 1 minute(s)

The WENCODEJSON subroutine will encode a string to properly be in a JSON value.

# WENCODEJSON Syntax

CALL WENCODEJSON(OPTION,INSTR,OUTSTR)
1

# Syntax Elements

Parameter Description
OPTION Leave blank.  Placeholder for future features
INSTR The string you wish to encode
OUTSTR The encoded string.

# WENCODEJSON Example

CALL WENCODEJSON("",'"',OUTSTR)
* OUTSTR = \u0022   (Encoding for ")
1
2

# WENCODEJSON Notes

The WENCODEJSON function is primarily used internally by the other subroutines (such as WBUILDJSON and WOBJ).  You can although call it yourself if you are doing your own string building.