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.

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

In the JSON Input step, the datastream field name, path and data type are defined.

NamePathType

id

$.customer.id

Integer

name

$.customer.name

String

email

$.customer.email

email

active

$.customer.active

Boolean

Here's a brief explanation of the JsonPath 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

Workshops

x

x

x

Last updated