# Building schema from JSON

You can easily build complex schema structures using our Build from JSON tool.

The **Build from JSON** tool lets you quickly create object or array schemas by pasting JSON data, instead of manually defining properties. This feature works in two contexts:

1. Step properties
2. Schema editing for API Management (APIM) and Callable workflows

## Building step properties

When editing step properties, you can use **Build from JSON** for objects and arrays without restricted type interfaces (e.g. that accept only certain values).

1. Locate the **"From JSON"** button next to a property.
2. Paste your JSON or edit the sample in the modal.
3. Click **"Preview schema"** to view the generated schema preview.
4. Click **"Apply to property"** to update the property, **"Back to editing"** to amend the JSON, or **close** the modal to discard changes.
   ![build-from-json-input](https://tray.ai/documentation/images/platform/automation-integration/advanced-use-cases/building-schema-from-json/4bBkVEv4qbUczML4fu8uFS_build-from-json-input.png)
   ![build-from-json-property-preview](https://tray.ai/documentation/images/platform/automation-integration/advanced-use-cases/building-schema-from-json/1m8mslicBIeMDix75mTnLa_build-from-json-property-preview.png)

## Building schema for API Management and Callable workflows

The Build from JSON tool is also available for editing schema.

1. Locate the **"Build from JSON"** button in the schema editor modal.
2. Paste your JSON or edit the sample in the modal.
3. Click **"Preview schema"** to apply the generated schema in the modal.
4. Click **"Save"** to apply the changes, or **"Cancel" **or** close** the modal to discard changes.
   ![build-from-json-schema-preview](https://tray.ai/documentation/images/platform/automation-integration/advanced-use-cases/building-schema-from-json/IjKvwjPpY827B7Rxx1b11_build-from-json-schema-preview.png)

## Example

Input:
`&#123;
  "name": "example",
  "details": \&#123;
    "age": 30,
    "location": "NYC"
  \&#125;
&#125;`
Generated schema:
Object with `name (string)` and `details `(`object with age (number)` and `location (string)`).
