util.JSONObject.toString()

util.JSONObject.toString() produces a JSON string from the values included in the JSON object.

Syntax

CALL util.JSONObject.toString()

Usage and examples

util.JSONObject.toString() creates a JSON string from the key:value pairs of the JSON object.

MAIN
DEFINE cust_rec RECORD
       cust_num INTEGER,
       cust_name,address VARCHAR(30)
       END RECORD
DEFINE obj util.JSONObject

LET cust_rec.cust_num=75
LET cust_rec.cust_name="Ferguson"
LET cust_rec.address="12 Marylon Street"

LET obj=util.JSONObject.fromFGL(cust_rec)
DISPLAY obj.toString()
CALL fgl_getkey()
END MAIN

 

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.