# JSON

{% hint style="info" %}

#### **JSON**

JSON (JavaScript Object Notation) is a lightweight data interchange format that's easy for humans to read and write, and simple for machines to parse and generate. It uses a text-based structure with key-value pairs and arrays to represent data. JSON is language-independent and widely used for transmitting data in web applications.

Now, to extract key-value pairs from this JSON object in Pentaho Data Integration, you would typically use the "JSON Input" step.

```json
{
  "customer": {
    "id": 1001,
    "name": "John Doe",
    "email": "john.doe@example.com",
    "active": true
  }
}
```

In the JSON Input step, the data stream field name, path and data type are defined.
{% endhint %}

| Name   | Path              | Type    |
| ------ | ----------------- | ------- |
| id     | $.customer.id     | Integer |
| name   | $.customer.name   | String  |
| email  | $.customer.email  | email   |
| active | $.customer.active | Boolean |

{% hint style="info" %}
Here's a brief explanation of the JSON Path notation used:

`$` represents the root of the JSON document

`.customer` navigates to the "customer" object

`.id`, `.name`, `.email`, and `.active` access the respective fields within the "customer" object
{% endhint %}

***
