B2B Integration 10.5 | Administering and Monitoring B2B Transactions | Service Development Help | Working with JSON Document Types | Creating a JSON Document Type
 
Creating a JSON Document Type
When you create a JSON document type you specify the following:
*The destination folder in which you want Designer to place the generated JSON document types.
*The source of the JSON schema.
*The name of the JSON document type.
When you create a JSON document type, keep the following information in mind:
*JSON document type can be created only from JSON schema.
*JSON document type can be created only when JSON schema contains JSON object as its root type.
*The fields in the JSON document type generated need not appear in the same order as in the JSON schema.
*Multi-dimensional and heterogeneous arrays are represented by Object list in the implementation. However, there is a way for you to know the contents of the schema, but it is not available for mapping during runtime.
*Integration Server uses the names in a JSON schema to name the generated Integration Server assets. For example, the referenced JSON objects in the JSON schema.
*Anonymous sub-schemas have no representations in the JSON document type.
*Erroneous properties for a field will be ignored by the parser.
*When using Integration Server data types with JSON, Integration Server supports upto draft 07 including draft 04, draft 06 and draft 07 and not "only" draft-07.
*Draft 04 of the JSON schema specification is considered default if $schema keyword is not present.
*When importing a JSON schema, if you do not specify types correctly then Integration Server automatically considers the types as object.
*A JSON document type does not support duplicate property fields. JSON document type uses only the latest property value and ignores subsequent ones as the property value is overwritten each time.
* To create a JSON document type
1. In the Service Development perspective of Designer, click File > New > JSON Document Type.
2. In the Create a New JSON Document Type dialog box, select the folder in which you want to create a JSON document type.
3. Click Next.
4. On the Select a Source Location panel, under Source location, do one of the following to specify the source JSON schema for the JSON document type:
*To use a JSON schema that resides on the Internet as the source, select File/URL. Then, type the URL of the resource. (The URL you specify must begin with http: or https:.)
*To use a JSON schema that resides on your local file system as the source, select File/URL. Then, type in the path and file name, or click the Browse button to navigate to and select the file.
5. Click Finish.
If the JSON content does not conform syntactically to the JSON schema, Integration Server does not create an JSON document type. Instead, Designer displays an error message that lists the number, title, location, and description of the validation errors within the JSON schema. If only warnings occur, Designer generates the JSON document type and the other assets.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.