---
title: "Creating Types From JSON Schema"
slug: "creating-types-json-schema"
tags: ["Custom Data Types", "JSON"]
updated: 2025-06-17T17:08:43Z
published: 2025-06-17T17:08:43Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Types From JSON Schema

## Overview

Users may create a data structure from JSON Schema with the **Create Types from JSON Schema** option.

When retrieving data from a **JSON object,** the JSON Schema automatically defines and generates a Simple Flow Structure with data fields formatted in the schema.

When creating a JSON Schema, it is recommended to have the title property for all class definitions to provide consistency for naming the general structure. For example "title" : "Person"

---

## Example

1. In a Designer Project, select CREATE DATATYPES/INTEGRATION from the top action bar.
2. In the **Create DataTypes/Integration** window, select**XML/JSON/CSV**from the right column then select **Create Types from JSON Schema**.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_12h53_12.png)
3. In the Create Types from JSON Schema creation window, name the JSON Schema.  It is also recommended to edit the default Namespace if the data structure resides in a deeply nested and/or populated environment.
4. Set the **Use Json Schema File**to **True** to upload a JSON Schema file or **False**to paste the JSON code. This example uses the following JSON code:

```json
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"firstname": {
"type": "string", 
"description": "The person's first name"
},
"lastname" : {
"type": "string", 
"description": "The person's last name"
},
"age" : {
"type": "integer",
"minimum": 0,
"description": "Age in years which must be equal to or greater than zero."
}
}
}
```

When set to True, the **Generate Complex Objects in Distinct Namespace**generates Objects with the same name in different namespaces i.e., the text in brackets in the Data Structure's Folder View. Enabling this assists with organizing child Objects of the main parent Object.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_12h56_29.png)
5. Click CREATE. A **JSON Schema Data Structure** and a **Simple Flow Structure**will appear in the Designer Project.
6. Right-click the****Simple Flow Structure and select**Edit Defined Data Structure**to see that Structure is****populated with the fields specified in the schema.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_12h59_55.png)

---

## Making Changes to the JSON Data Structure

To make changes to the JSON Data Structure, users should only edit the JSON directly to ensure data remains consistent.

1. Right-click the desired JsonSchemaDataStrucute and select **Edit**.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_13h01_20.png)
2. When the **Edit Json Schema**window appears, make any necessary changes to the Json code. After all of the updates are completed, click SAVE SCHEMA.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_13h02_36.png)

---

## Deserializing the JSON Schema

To test the JSON Schema, use a [JSON Deserialize](https://documentation.decisions.com/step-library/docs/json-deserialization) step to deserialize the object and view the data in the input/outputs in the Flow Debugger.

1. In a Designer Folder, create a Flow.
2. In the Toolbar, navigate to **DATA > JSON** and add a**JSON Deserialize** step to the **Start** step. Connect the outcome paths to the **End** step.
3. On the **Properties** panel, check the **IsOutputArray**option under PARAMETERS. Set **JSON Type**to the JSON Schema "JSONSchemaPerson" from the dropdown menu.
4. For the **String to Deserialize**input, set the mapping type to **Merge Plain Text** and click****SHOW EDITOR.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_13h06_10.png)
5. In the **Merge Text Editor**window, paste the following JSON code to represent an array of JSON Objects. Click SAVE.

```json
[
{
"firstname": "Guy",
"lastname": "Person",
"age": "32"
},
{
"firstname": "Hugh",
"lastname": "Mann",
"age": "30"
}
]
```

  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-17_13h07_02.png)

### Debug

1. Click **Debug**from the top action bar.
2. Select START DEBUGGING.
3. In the Debugger, click the step, click **Execution 1**, and select **View Input/Output Data** to see that the JSON Schema was deserialized.

---

For further information on Data Structures, visit the [Decisions Forum](https://community.decisions.com/categories/Datastructures).
