Native JSON schema support
Native JSON schema type tree is created automatically when a valid JSON schema is entered in the type tree field of a card.
The JSON document is determined to be a JSON schema when a field called $schema is found in the outermost group. If this element is not found in the JSON document will be treated as a template.
When you use native JSON to define the main input or output card, always select the main Type as the first JSON type.
This restriction does not apply to functional maps.
A card property called Data Language is present for output cards which use native JSON. This card property allows the text encoding of the JSON output to be selected. The following encodings are supported: UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE. Previously, an item type in a native JSON type tree named encoding was used for this purpose. The encoding item remains valid for type trees and maps which use it. Conversion of a rule on an encoding item is necessary if the rule becomes invalid due to the absence of an encoding item in a native JSON type tree.
The encoding field on input always returns the value NONE. On output, this field can be set to any valid JSON encoding and the JSON document is produced that uses that encoding. If you do not configure the encoding, the default encoding used is UTF-8.
To suppress JSON validation, set the card option Document Verification to "Well Formed".
To also suppress errors due to fields not present in type tree, set the card option Document Verification to "Ignore Undefined Constructs".
- Any dynamic type change to a field. (A field1 is a string, but if field2 equals 'A' then field1 is a number.) - Data will be loaded into these fields but it will not be validated.
- Tuple validation is not supported.
- Any array validation where different iterations of an array are validated differently.
- Elements will be loaded into a string array, but not validated.
The target of "if" statement must appear in the data stream before fields in the Then or the Else. Out of order data will cause the "if" to fail.
Dependencies that alter the initial type are not supported. Data will be loaded into fields but not validated.
For example: Field B is defined as string.
A dependency where if field A is present then field B now must be a date.
ITX will handle this, but no validation will be done.