Available in...
Open Studio for Big Data
Open Studio for Data Integration
Open Studio for ESB
Procedure
-
In the dialog box, select Input Json and
click Next to proceed to the next step of the
wizard to load the input file.
-
From the Read By list box, select the type of
query to read the source JSON file.
-
JsonPath: read the JSON data based on a JsonPath query.
This is the default and recommended query type to read JSON data in order to gain performance and to avoid problems that you may encounter when reading JSON data based on an XPath query.
-
Xpath: read the JSON data based on an XPath query.
-
-
Click Browse... and browse your directory to
the JSON file to be uploaded. Alternatively, enter the full path to the file or
the URL that links to the JSON file.
In this example, the input JSON file has the following content:
{"movieCollection": [ { "type": "Action Movie", "name": "Brave Heart", "details": { "release": "1995", "rating": "5", "starring": "Mel Gibson" } }, { "type": "Action Movie", "name": "Edge of Darkness", "details": { "release": "2010", "rating": "5", "starring": "Mel Gibson" } } ]}
The Schema Viewer area displays a preview of the JSON structure. You can expand and visualize every level of the file's JSON tree structure. - Enter the Encoding type in the corresponding field if the system does not detect it automatically.
-
In the Limit field, enter the number of
levels in the JSON hierarchical depth to which you want to limit the JsonPath or
XPath query, 0 for no limits.
Setting this parameter to a value less than 5 can help prevent the wizard from hanging in case of a large JSON file.
- Click Next to define the schema parameters.