In this section: How to: |
You can configure the Adapter for JSON from the Web Console or the Data Management Console.
You can configure the adapter from either the Web Console or the Data Management Console.
or
From the Data Management Console, expand the Adapters folder.
The Adapters folder opens.
The Add Adapter to Configuration pane opens.
Note: The JSON adapter is located under the XML-based group folder. No input parameters are required.
How to: |
You must explicitly issue a FILEDEF command to associate a Master File with a JSON document. In order to properly code the FILEDEF command, you need to determine how the JSON documents are organized. If the documents are all in one file, the organization is called a COLUMN. If there are various documents in one directory, then the organization is called a COLLECTION.
Source |
Collection Organization |
Column Organization |
---|---|---|
disk |
supported |
supported |
http |
not supported |
supported |
https |
not supported |
supported |
FILEDEF ddname source filename
where:
Is the logical reference name matching the desired Master File.
Is the location of the JSON document. Possible values are http, https, and disk.
For a JSON Column, is the full path to the source file.
For a JSON Collection, is the full path to the source directory. The directory name must be followed by the wildcard characters '*.*'.
The file name must start with 'http://' or 'https://' if the JSON documents are to be read using an HTTP or HTTPS session.
Note: If you are working on the Web Console or Data Management Console Create Synonym panes, see Synonym Creation Parameters for JSON for details about how FILEDEFs are created.
For Windows, when you have the ordercol.JSON document under C:\, use the following FILEDEF in your profile:
FILEDEF ordercol disk C:\ordercol.JSON
For UNIX, when you have the ordercol.JSON document under /usera/JSON/, use the following FILEDEF in your profile:
FILEDEF ordercol DISK /usera/JSON/ordercol.JSON
For z/OS, when you have the ordercol.JSON document in TEST.JSON, use the following FILEDEF in your profile:
FILEDEF ordercol DISK //'TEST.JSON'
For HTTP and HTTPS, when you have the ordercol.JSON document under http://www.test.com/JSONtest/ (or https://www.test.com/JSONtest/), use the following FILEDEF in your profile:
FILEDEF order http http://www.test.com/JSONtest/ordercol.JSON
or
FILEDEF order http https://www.test.com/JSONtest/ordercol.JSON
Note: If you are working on the Web Console or Data Management Console Create Synonym panes, see Synonym Creation Parameters for JSON for details about how FILEDEFs are created.
For Windows, when you have the order1.JSON and order2.JSON documents under C:\ORDERS, use the following FILEDEF in your profile:
FILEDEF order disk C:\orders\*.*
For UNIX, when you have the ordercol.JSON document under /usera/orders, use the following FILEDEF in your profile:
FILEDEF ordercol DISK //'TEST.JSON'
For z/OS, when you have the order document in TEST.JSON, use the following FILEDEF in your profile:
FILEDEF order DISK /usera/orders/*.*
iWay Software |