## JSON Connection Wizard

This wizard appears when you select JSON and click OK in the New Data Source dialog, or in the Catalog Browser right-click a data source and select Add JSON Connection from the shortcut menu or right-click an existing JSON connection and select Edit Connection from the shortcut menu. It helps you to import an XML schema and transform it to a relational schema for future use, and consists of the following screens:

- Extract JSON Schema screen
- Modify Schema Properties screen
- Transformed Relational Schema screen
- Add Table screen

Back

Goes back to the previous screen.

Next

Goes to the next screen.

Finish

Finishes confirming to transform a JSON schema to a relational schema.

Cancel

Does not retain changes and closes this wizard.

Help

Displays the help document about this feature.

### Extract JSON Schema screen

Specifies the necessary information to extract JSON schema. See the screen.

Schema Source

Specifies the source to extract JSON schema, from sample data or instance data.

Sample Data

Specifies the sample file by clicking the Browse button or inputting the URI string directly in the text box. You can use parameters or constant level formulas predefined in the current catalog data source or the special field User Name in the string, and the format of the predefined parameters used in the string is "@" + parameter name. For example, if the parameter string of a class is SQL=select * from employee, and you want to use the parameter sql in a catalog to replace the part after "=" in the string, then the parameter string of the class will be SQL=@sql. Moreover, if a parameter string contains characters, such as @, '.' or double quotation marks, or other strings that do not need to be parsed, quote the whole string with double quotation marks. If the special field User Name is used, when clicking Next, the Security Identifier dialog will pop up for you to specify the security ID (SID), which refers to the user name, used to generate the JSON schema. It is available only when you select Extract Schema from Sample Data from the Schema Type drop-down list.

- RESTful
  Opens the RESTful Data Source Options dialog to specify the RESTful data options for the remote sample data. Available only when the schema is from a remote sample file.

Refresh

Available only when you edit an existing JSON connection. Once you make some change in the wizard and click the Refresh button, the JSON schema information will be reloaded according to what you have changed.

Instance

Specifies the JSON instance. It should match with the selected JSON schema. You can use parameters or constant level formulas predefined in the current catalog data source or the special field User Name in the string, and the format of the predefined parameters used in the string is "@" + parameter name. For example, if the parameter string of a class is SQL=select * from employee, and you want to use the parameter sql in a catalog to replace the part after "=" in the string, then the parameter string of the class will be SQL=@sql. Moreover, if a parameter string contains characters, such as @, '.' or double quotation marks, or other strings that do not need to be parsed, quote the whole string with double quotation marks. If the special field User Name is used, when clicking Next, the Security Identifier dialog will pop up for you to specify the security ID (SID), which refers to the user name, used to generate the JSON schema. While, at runtime, you can go to the General category of the Options dialog by clicking File > Options on the menu bar to set the User Name option. Not available when you select Extract Schema from Sample Data from the Schema Type drop-down list and select User Defined.

- RESTful
  Opens the RESTful Data Source Options dialog to specify the RESTful data options for the remote URI data. Available only when the JSON file is from a remote file.

Edit Format

Opens the Edit Format dialog to specify the format of the referenced values.

- Name
  Displays names of the referenced values.
- Format
  Specifies formats for the referenced values.
- OK
  Accepts changes and closes the dialog.
- Cancel
  Does not retain changes and closes the dialog.

The three operations below are available only when you select Extract Schema from Sample Data from the Schema Type drop-down list.

- URI
  If selected, specify a JSON file by clicking the Browse button or input the URI string directly in the text box.
- User Defined
  Specifies to get data from user defined interface.
  - Class Name
    Specifies the full name (including package name) of the class by clicking the Browse button or inputting the class name directly in the text box. The class should be appended to the class path in the system environment.
  - The class implements
    After filling in the Class Name field, the class name of the interface that the class implements will be displayed here.
  - Parameter
    Specifies the parameter string for the user defined data interface. The parameter string must match the format defined in the class. You can use parameters or constant level formulas predefined in the current catalog data source or the special field User Name in the string, and the format of the predefined parameters used in the string is "@" + parameter name. For example, if the parameter string of a class is SQL=select * from employee, and you want to use the parameter sql in a catalog to replace the part after "=" in the string, then the parameter string of the class will be SQL=@sql. Moreover, if a parameter string contains characters, such as @, '.' or double quotation marks, or other strings that do not need to be parsed, quote the whole string with double quotation marks. If the special field User Name is used, when clicking Next, the Security Identifier dialog will pop up for you to specify the security ID (SID), which refers to the user name, used to generate the JSON schema. While, at runtime, you can go to the General category of the Options dialog by clicking File > Options on the menu bar to set the User Name option.
- Create Parameter
  Opens the Create Parameter dialog to create a parameter, and then you can dynamically specify a JSON instance or user defined interface that matches with the selected JSON schema at runtime.

### Modify Schema Properties screen

Specifies properties of the JSON schema. See the screen.

Schema

Lists the corresponding schema structure of the root. stands for elements, stands for the attributes in the XML schema and stands for the references of elements.

Properties

Lists all the properties of the selected elements and attributes in the schema.

- Name
  Displays names of properties of the selected elements or attributes.
- Value
  Specifies values of properties for the selected elements or attributes.

### Transformed Relational Schema screen

This screen lists the transformed relational schema structure. It helps you to click Next to confirm the transformation results and go into the Add Table screen. See the screen.

Transformed Tables

Shows tables transformed from JSON schema.

### Add Table screen

Adds tables that are transformed from the relational schema to the connection. This screen is not available when you edit an existing JSON connection. See the screen.

Tables

Lists the tables transformed from the JSON schema.

Added Tables

Lists the tables that you have added from the relational schema.

Adds the selected tables.

Removes the selected tables from the Added Tables box.

###### Related topics:

- Setting up a JSON connection