Store Method (JSONDATA)
10.8, PLBCMP GUI Only
The Store method is used to output a JSON string using the JSONDATA object nodes. This method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A JSONDATA object previously declared.
return
Optional. A Character Variable that returns the output JSON string. If an error occurs while generating the JSON output string, the Character Variable is returned as a NULL variable.
options
Optional. A Numeric Variable, decimal number, or Numeric expression that defines a bit mask value that is used to control the behaviors of this method.
Flags Affected: EOS, OVER, ZERO
Notes:
The EOS flag is set if the output JSON string is truncated because the {return} variable is too small.
The ZERO and OVER flags are always cleared.
The {options} bit mask values are defined in plbmeth.inc file as follows:
|
Option |
Value |
Meaning |
|
$JSF_STORE_OUTPUT_INDENTION |
0x02 |
Output JSON line with indention being used. |
|
$JSF_STORE_OUTPUT_CRLF |
0x04 |
Output CR/LF EOR for each JSON line. |
|
$JSF_STORE_USE_TAB |
0x40 |
Use one tab character (0x9) to indent JSON lines if this bit is set. Otherwise, blank characters (0x20) are used. |
If an error occurs, the JSONDATA object method 'SyntaxError' can be used to retrieve that last error that was generated.
See Also: Method Syntax, JSONDATA Methods
![]() |