JSON sample data dialog

The JSON sample data dialog lets you load JSON data into the Data Model (see Loading data).
By default, the JSON data is mapped to corresponding fields in the existing Data Model. Data that does not correspond to any field is discarded.
You may use the Replace Data Model option to let the JSON data replace the existing Data Model.

The dialog is opened via the menu: File > Add data > JSON sample data, or via the JSON Sample Data toolbar button on the Data Model pane.

The options in this dialog are:

  • File: The path and name of the JSON file to use. The file is assumed to be UTF-8 encoded.

  • Browse: Opens an explorer window to browse folders and select a JSON file.

  • The box below the file name allows to paste or enter JSON data. After opening a JSON file the JSON data will appear in this box. You can review and edit the JSON.

  • Replace Data Model: Selecting the Replace Data Model option removes the existing Data Model from the template and creates a new Data Model based on the keys found in the JSON. When this option is not checked, the JSON data is mapped to any corresponding fields in the existing Data Model, and data that does not correspond to any field is discarded.

  • Finish: If the JSON is valid, you may click Finish to import the data into the Data Model pane. Arrays of objects are converted to records; key-value pairs are converted to data fields. If a value in a record object is a JSON object, it is ignored.

Note: The JSON Sample Data is not stored with the template. In order to reuse the data you should create a JSON file on disk and load it via the File option in this dialog.

Types of JSON data

Examples

Example: A single record with two fields

{ "first": "Peter", "last": "Parker" }

Example: Two records

[{ "first": "Peter", "last": "Parker" },
{"first": "Martin", "last": "Moore"
}]

Example: A single record with a detail table

{
"name":"Peter Parker",
"email":"parkerp@localhostcom",
"detail": [{"id":"inv123","ExtraData":"hello"},{"id":"456","ExtraData":"world"}]
}

For more examples see .