# 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 %}

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.pentaho.com/pentaho-data-integration/data-integration/data-sources/flat-files/json.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
