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:
- minimum and maximum
- minLength and maxLength
- exclusiveMinimum, exclusiveMaximum
- minItems, maxItems
- 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.
- Toolset defaults can be specified. These are used when not specified by schema
- BankId has min and max values captured.
- BankName has min and max length captured:
- HasAccounts treats boolean as string with enumeration values
- StateProvince has schema enums captured