Product: ACUCOBOL-GT
Modules: Runtime, Compiler
Machines Affected: All
This change adds support for JSON PARSE/GENERATE NAME OMITTED, allowing the parsing or generating of JSON while omitting the name of the top-level COBOL group item.
For example, if you receive some JSON without a matching top level name:
{"ABC":123,"DEF",456}
You can parse it into a COBOL data item such as:
01 TOP-LEVEL. 03 ABC PIC 999. 03 DEF PIC 999.
By omitting the name of the top level-group item:
JSON PARSE JSON-DATA INTO TOP-LEVEL NAME OF TOP-LEVEL is OMITTED
The TOP-LEVEL data item is populated even though the JSON data does not contain a matching TOP-LEVEL name. Similarly, when used with JSON GENERATE, the generated JSON data omits the name of the TOP-LEVEL group item.
For details about this feature, see The JSON PARSE Statement and The JSON GENERATE Statement in your ACUCOBOL-GT documentation.