# WENCODEJSON

Updated: 4/3/2020, 10:08:01 PM
Created: 4/3/2020, 10:08:01 PM
Last Updated By: Mike Street
Read Time: 1 minute(s)

Created At: 6/24/2017 1:07:56 AM
Updated At: 11/25/2017 10:59:15 AM
Original Doc: wencodejson
Original ID: 260984
Internal: No

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

# COMMAND 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.

# EXAMPLE

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

# 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.