Thunder Suite   •  JSON Thunder   •  XML Thunder   •  FAQs   •  Tutorials   •  Wiki   •  Levelset History   •  JSON Thunder Technical Details   •  XML Thunder Technical Details

Thunder Wiki for Thunder Suite, JSON Thunder & XML Thunder

Page History: JSON Data Type Support

Compare Page Revisions



Older Revision - Back to Page History - Current Revision


Page Revision: 2015/06/19 13:45


JSON Data Type to COBOL Field Type Mapping

The following JSON schema types are supported in XML Thunder:

Image



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)



Example

The table on the next page shows a sample JSON schema next to the corresponding COBOL copybook generated by XML Thunder.

ImageImage

BankID

  • Size determined from max value in schema

TransitNbr

  • Size based on toolset default for decimal values

Accounts-Count

  • Inserted by XT to control repeating structure (for reader = how many were found; for writer=how many to output)

Accounts-Grp

  • 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. 1. Toolset defaults can be specified.  These are used when not specified by schema
  2.  

    Image

  3. 2. BankId has min and max values captured.


  4. Image

     
  5. 3. BankName has min and max length captured:


  6. Image

     
  7. 4. HasAccounts treats boolean as string with enumeration values
  8.  

    Image

  9. 5. StateProvince has schema enums captured
 

Image