Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. Using the IntelliScript Editor
  7. XMap
  8. Libraries
  9. Schema Object
  10. Command Line Interface
  11. Scripts
  12. Parsers
  13. Script Ports
  14. Document Processors
  15. Formats
  16. Data Holders
  17. Anchors
  18. Transformers
  19. Actions
  20. Serializers
  21. Mappers
  22. Locators, Keys, and Indexing
  23. Streamers
  24. Validators, Notifications, and Failure Handling
  25. Validation Rules
  26. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

Sample JSON Schema

Sample JSON Schema

The following example is a sample JSON schema:
{"type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "#", "required":false, "properties":{ "OrgId": { "type":"string", "id": "OrgId", "required":false }, "metrics": { "type":"array", "id": "metrics", "required":false, "items": { "type":"object", "id": "0", "required":false, "properties":{ "name": { "type":"string", "id": "name", "required":false }, "valueTrend": { "type":"array", "id": "valueTrend", "required":false, "items": { "type":"object", "id": "0", "required":false, "properties":{ "date": { "type":"string", "id": "date", "required":false }, "val": { "type":"string", "id": "val", "required":false } } } } } } } } }
The schema defines the elements and attributes that can occur in a JSON document. The schema uses the JSON syntax to specify the hierarchy and sequence of elements, whether elements are required, the element type, and possible values.
The previous sample schema defines the following JSON input document:
{"OrgId": "ORG000000000001", "metrics": [ { "name": "COL1", "valueTrend": [ { "date": "2011-11-01", "val": "122.456" }, { "date": "2011-11-02", "val": "215.1" } ] }, { "name": "COL2", "valueTrend": [ { "date": "2011-11-01", "val": "122.456" }, { "date": "2011-11-02", "val": "215.1" } ] } ] }
If you trace through the schema, you can determine the relationship between the elements of the schema and input document.
The schema hierarchy contains the
metrics
object that nests the
valueTrend
array. The array contains the fields
date
and
val
that are of the
string
data type.


Updated September 26, 2018