---
url: >-
  /statelake/administering-statelake/designer/data-definitions/json-definitions/design-json-definitions/json-dataview-creating-a-new-dataview.md
---

# JSON Dataview - Creating A New Dataview

The **JSON Dataview** will prompt for information about the data that is to be extracted from or written to the **JSON** file, as specified on the initial screen through the **File Connection**.

Before you start creating your dataview, it is most important that you understand the structure of the **JSON** file that you will be working with. Essentially, **JSON** definitions are used to convert **JSON** text into a set of tables, and vice-versa.

The **JSON** dataview uses a single **JSON** **Designer** screen to capture all of the information that it needs.

Once complete, click **OK** to save the details, generate a dataview, and return to the designer canvas.

## Fields

| Field Name | Description |
|---|---|
| Data View name | The **Name** of the dataview. This field is not forced to uppercase, and spaces will be treated as spaces. |
| Objects path | Specify the path, such as square brackets  \[] for a root array, or \[].\<dictionary>.{} for a sub-object path within a root array, or \<array>\[] for a named array. |
| Objects key field | The field that holds the **key** value for each object in this dataview. Also see *Fields Path*. |
| Create separate file for each record | Tick this box to create a file for every record. The default is to have this unticked. |
| Fields  *Name* | The **name** within the dataview to be used for this field. It does not have to match the name of the object within the **JSON** file, |
| *Type* | The data **type** of this field. While there is no drop-down box to select from, type the first letter of the data type to populate.For example, type **S** and the entry completes with the word **String**. Type **I** and it becomes **Integer**, type **B** for **Boolean**, or type **F** for the entry to become **Float**.If this field is for the **key** value, then the data **type** should be **Integer**. |
| *Size* | The **size** of this field. **Integer** data type will default to zero ( **0** ). |
| *Path* | The name of the object in the **JSON** file.::: warningThis field is case sensitive. If the object is called **group** in the **JSON** file, then it must be identified as **group** here - if it is entered here as **Group** it will not be included.:::If this is the **key** value for the sub-object, then the **path** will be the word **key**. |
| *Default* | The **default** value for the field. |

## Buttons

| Button Name | Description |
|---|---|
| Fields *Add* | **Add** a new field to the list. |
| *Delete* | **Delete** the current field from the list. |
| ![image-20240506-003411.png](/statelake/images/image-20240506-003411-69e15aff.png) *UP Arrow* | Move the current selected field **up** the list order. |
| ![image-20240506-003537.png](/statelake/images/image-20240506-003537-b70778d5.png) *DOWN Arrow* | Move the current selected field **down** the list order. |
| OK | Click to save any changes you have made. All changes will be lost if you do not click the **OK** button. |
| Cancel | Click to **Cancel** any changes you have made. |

The following example shows a small simple **JSON** file, containing details of several types of flower.

The **BLUE** indicates the start/end dictionary pair of curly braces { }, enveloping the entire code.

The **RED** indicates the start/end of the named **JSON** array called **Flowers**, identified by the presence of the square brackets  \[ ].

The **GREEN** indicates the initial iterating dictionary shown by the curly braces { } within the **JSON** object array.

This **JSON** file is referenced in the **JSON** definition as below.

This results in the following dataview and **Preview**.

Note that where the fields are not present for a particular iterating dictionary object, the field is left blank in the dataview.
