---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/json-funcs.md
cuppy_section: docs
cuppy_doc: 4HC8-76GB
cuppy_doc_uuid: 55fb4d0d-b6e7-4e5e-a15a-5aae990ee0ad
cuppy_permalink: https://cuppy.io/salesforce/d/4HC8-76GB
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/json-funcs
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 46afb07ba221380b2f1e810419068b1967cea919c319661fddbba548d0a912ea
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/json-funcs.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## JSON Functions

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Hyper supports the SQL:2016 functions for constructing [JSON](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/json.html) values from SQL data. Use JSON functions to:

*   **Build JSON arrays** from a list of values.
*   **Build JSON objects** from key-value pairs.
*   **Convert any scalar value** to its JSON representation.
*   **Parse and embed** pre-formatted JSON documents.

Build JSON values from SQL data:

*   `[json](./json-constructor.md)` - Parse a string into a JSON value.
*   `[json_array](./json-array.md)` - Build a JSON array from a list of values.
*   `[json_object](./json-object.md)` - Build a JSON object from key-value pairs.
*   `[json_scalar](./json-scalar.md)` - Convert any scalar value to JSON.

*   Strings passed as arguments are escaped and become JSON string values. To embed a value as raw JSON instead, pass a `json`-typed value or use the `FORMAT JSON` modifier.
*   The `RETURNING` clause and the `WITH UNIQUE KEYS` option from the SQL:2016 standard aren’t supported.

Combine `json_object` and `json_array` to build a nested document from table columns.

Returns `{"id":42,"name":"Alfons","phone_numbers":["(415) 555-0134"]}` for a customer with only a mobile number on file.

Use the `json` constructor to embed an existing JSON document without escaping it.

Returns `{"a":1,"b":{"nested":true}}`.

*   [JSON Type](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/json.html)
*   [JSON_ARRAYAGG](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/json-arrayagg.html) - Aggregate values from a group into a JSON array.
*   [Array Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/arrays.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
