Constructor
Creates a new instance of the JSONStream class.
Format 1
JSONStream ( Record-Definition ) |
Format 2
JSONStream ( Record-Definition, hasDummyRoot ) |
Format 3
JSONStream ( Record-Definition, hasDummyRoot, encoding ) |
Syntax rules
1. Record-Definition is a level 01 group data item for which the
IS IDENTIFIED clause has been specified.
2. hasDummyRoot is an alphanumeric data item or literal hosting a boolean value (e.g. "0", "1", "true", "false", "yes", "no", "on" or "off"). If the boolean value is TRUE, then the top level item of Record-Definition is discarded and will not appear in the JSON stream . This parameter can be NULL, in such case, FALSE is assumed.
General rules
1. When a new instance of JSONStream is created, the data item identified by Record-Definition is associated with the new object.
Code example
... configuration section. repository. class jsonStream as "com.iscobol.rts.JSONStream" . ... working-storage section. ... 77 objJsonStream object reference jsonStream. 01 Record-Definition identified by "Record-Definition". (JSON fields) ... procedure division. ... set objJsonStream to jsonStream:>new(Record-Definition) ... |