Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

WPARSEJSON

The WPARSEJSON is a simple jSON parsing subroutine.  It has been been replaced with WOBJ. 

COMMAND SYNTAX

CALL WPARSEJSON(JSON,FIELD,VALUE,ERR)

SYNTAX ELEMENTS

ParameterDescription
JSONThis is the jSON string.
FIELDThe field name you wish to get.
VALUEThe returned value
ERRAny returned errors

EXAMPLE

JSON=\{ "field1":"value1","field2":"value2" }\
CALL WPARSEJSON(JSON,"field1",VALUE,RERR)
* VALUE will equal "value1"

NOTES

This is a very simple parser.  It cannot handle nested objects or arrays.  It is better to use WOBJ to parse jSON.

Was this article helpful?