# json

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: json
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-data-types/json
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-data-types/json.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-data-types/json.adoc
description: The `json` data type stores values in `json`, an open standard format for key-value data.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-data-types/json.md -->

## [](#overview)Overview

JSON stands for JavaScript Object Notation. It is an open standard format with key-value pairs to transport data between a server and a web application.

## [](#syntax)Syntax

The `json` data type in Redpanda SQL has the following syntax:

```sql
variable_name JSON
```

## [](#examples)Examples

### [](#create-a-table)Create a table

First, create the `orders` table using the following command:

```sql
CREATE TABLE orders (
    orders_Detail JSON
);
```

This creates a table with the `orders_Detail` column to store key-value pairs of data.

### [](#insert-data)Insert data

Next, insert data into the orders table as follows:

```sql
INSERT INTO orders (orders_Detail)
VALUES
('{ "customer": "Dean Smith", "items": {"product": "cup","qty": 2}}'),
('{ "customer": "Sissy Kate", "items": {"product": "knife","qty": 1}}'),
('{ "customer": "Emma Stone", "items": {"product": "spoon","qty": 4}}'),
('{ "customer": "Chris Bale", "items": {"product": "fork","qty": 5}}'),
('{ "customer": "Mike Stuart", "items": {"product": "spatula","qty": 2}}');
```

This inserts data values where `orders_Detail` has the following keys:

-   `customer`: Stores the customer’s data.

-   `items`: Stores the order details, including `product` and `qty`.


### [](#retrieve-data)Retrieve data

Use the `SELECT` command to retrieve the orders table’s data.

```sql
SELECT * FROM orders;
```

The query returns the following output:

```sql
+--------------------------------------------------------------------------+
| orders_detail                                                            |
+--------------------------------------------------------------------------+
| {"customer":"Dean Smith","items":{"qty":2.000000,"product":"cup"}}       |
| {"customer":"Sissy Kate","items":{"product":"knife","qty":1.000000}}     |
| {"customer":"Emma Stone","items":{"qty":4.000000,"product":"spoon"}}     |
| {"customer":"Chris Bale","items":{"product":"fork","qty":5.000000}}      |
| {"customer":"Mike Stuart","items":{"qty":2.000000,"product":"spatula"}}  |
+--------------------------------------------------------------------------+
```

> 💡 **TIP**
>
> It is normal for the `json` type’s result to look disordered.