Use a JSON schema or a view created from the JSON schema to compose JSON data.
Select the top-level element or a view of a JSON schema that describes the JSON data that you want to compose. The JSON schema is a schema generated while importing a JSON data instance into the schema library.
By default, the JSON Composer uses strict validation, and the job fails if a violation occurs. To customize validation, specify the action to perform when a violation occurs.
Create a mapping to the document_collection item. How you map this item determines whether one document or multiple documents are created. To produce only one document, map the root of the input (top) to the document_collection item. If you want each item in the list to be in a separate document, then map a list to the document_collection item.. If you produce multiple documents, one file is created for each item in the list. For more information about mapping, see Working with the mapping table.
An JSON array is modelled as multiple occurrences of mixed types. The choiceDescriminator indicates which choice branch you should select for the particular array element. Below is an example of JSON array.
[
{"type": "home", "number": "212 555-1234"},
[116, 943, 234],
true
]
In the above example, the choiceDescriminator has the value of objectValue for the first array element which is an object. The choiceDescriminator has the value of arrayValue because the second array element is a nested array. The choiceDescriminator has the value of booleanValue. The choiceDescriminator value contains stringValue, numberValue, booleanValue, nullValue, objectValue, and arrayValue. When composing the JSON data you need to choose which value should be used from the available values. If you want the value as objectValue for the choiceDescriminator, then from the Source column, select Constant from the drop down list and enter the Constant Value as objectValue and click OK. In a similar way, if you want the value as stringValue, then the Constant value should be stringValue