StoreSize Method (JSONDATA)


10.8, PLBCMP GUI Only

 

The StoreSize method is used to retrieve the variable size required to retrieve the output JSON data string using the current JSONDATA object nodes. This method uses the following format:

 

[label]

{object}.StoreSize

[GIVING {return}][USING [*OPTIONS=]{options}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A JSONDATA object previously declared.

return

Optional. A Numeric Variable that returns the output JSON string size.

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:

  1. The ZERO flag is set if the {return} value is zero. Otherwise,this flag is cleared

  2. The OVER flag is set if the output JSON string size value is too large and must be truncated when the size is put into the {return} variable.

  3. The EOS flag is always cleared.

  4. The {options} bit mask values are defined in plbmeth.inc file as follows:

  5.  

    Option

    Value

    Meaning

    $JSF_STORESIZE_OUTPUT_INDENTION

    0x02

    Output JSON line with indention being used.

    $JSF_STORESIZE_OUTPUT_CRLF

    0x04

    Output CR/LF EOR for each JSON line.

    $JSF_STORESIZE_USE_TAB

    0x40

    Use one tab character (0x9) to indent JSON lines if this bit is set. Otherwise, blank characters (0x20) are used.

     

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



PL/B Language Reference