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

# JSON

### **Overview:**

The `JSON` block facilitates the construction of JSON objects that can be utilized as input for other blocks that require JSON data. This block provides a flexible hybrid approach, allowing you to define headers and body content for the Call API block efficiently.

***

### Inputs & Outputs

| I/O    | Feature | Type   | Simple Explanation                                                 |
| ------ | ------- | ------ | ------------------------------------------------------------------ |
| input  | `data`  | object | The properties that will be included in the resulting JSON object. |
| output | `json`  | object | The generated JSON object, ready for use in subsequent blocks.     |

***

### Adding Properties

You can specify properties for the `data` input using several approaches:

1. **Static:** You manually set predefined properties from the side panel.
2. **Dynamic:** You pass an entire object into the block during runtime.
3. **Hybrid:** Some properties are predefined while others are accepted dynamically at runtime.

#### Method 1 - Static

To use static methods, click on the block to access the side panel. Locate the data section where you can click "+ Add data" to add header properties or click "X" to remove any existing property.

#### Method 3 - Hybrid

In a hybrid setup, start by defining certain static properties and allow dynamic inputs from other blocks during execution. Click on "+ Add data" within the side panel to add a property and enter any static values as outlined in Method 1 above.

For dynamic values, only provide a key and leave its value blank; this will create a new handle named `data.YOUR_KEY_NAME`. You can then connect outputs from various blocks as needed.

***

### Use Cases

Consider how this block streamlines processes in various scenarios:

* **API Interaction:** When developing applications that call external APIs, this block simplifies building complex headers and nested body structures critical for many modern API specifications.
* **Dynamic Form Submission:** In scenarios where forms need to send structured data dynamically based on user input or previous actions within your application flow.
* **Data Transformation Tasks:** Aiding situations where needed parameters change frequently; thus requiring rapid adjustments without rewriting configurations continuously.
* **Configuration Management**: When there is a necessity to manage configuration settings stored as JSON; easily customize settings based on different environments (like development, testing, production).

In conclusion, with its versatile handling of JSON objects combined with both static and dynamic capabilities—this `JSON` block is essential whenever structured communication via APIs is required!
