# WBUILDJSON

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)

Note: This function has been depreciated and it is recommend you use WOBJ instead.

The WBUILDJSON is a very simple JSON building subroutine.  It basically handles encoding of your values.  This subroutine has been replaced by WOBJ.

# WBUILDJSON Syntax

CALL WBUILDJSON(JSON,FIELD,VALUE,ERRORS)
1

# Syntax Elements

Parameter Description
JSON This is the JSON string that is being built
FIELD The field you wish to set
VALUE The value you wish to set the field to.
ERRORS Any returned errors.

# WBUILDJSON Example

JSON="{"
CALL WBUILDJSON(JSON,"status","ok",RERR)
JSON:="}"
* JSON NOW EQUALS: { "status":"ok" }
1
2
3
4

# WBUILDJSON Notes

This is a very simple function.  In order to build arrays you must manually build the strings.  This function has been replaced with the much more powerful WOBJ subroutine.  This function remains for backwards compatibility.