Page History: JSON Data Type Support
Compare Page Revisions
Page Revision: 2015/06/19 13:29
JSON Data Type to COBOL Field Type Mapping
The following JSON schema types are supported in XML Thunder:
Other Properties Supported
The following properties are supported and used for COBOL field size declaration as well as message validation:
- • required
- • minimum and maximum
- • minLength and maxLength
- • exclusiveMinimum, exclusiveMaximum
- • minItems, maxItems
- • default
- • enum
- • divisibleBy
- • Format (for date, time and datetime)
The table on the next page shows a sample JSON schema next to the corresponding COBOL copybook generated by XML Thunder.
- • Size determined from max value in schema
- • Size based on toolset default for decimal values
- • Inserted by XT to control repeating structure (for reader = how many were found; for writer=how many to output)
- • OCCURS size from toolset default. If maxItems has been specified in schema, it would have been used.
HasAccounts and StateProvince
- • 88 levels from schema enums
XML Thunder Toolset Support
The following screenshots show the XML Thunder Handler Design created from the above schema.
- 1. Toolset defaults can be specified. These are used when not specified by schema
- 2. BankId has min and max values captured.
- 3. BankName has min and max length captured:
- 4. HasAccounts treats boolean as string with enumeration values
- 5. StateProvince has schema enums captured