> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON functions

> BigQuery JSON functions and accessors supported in BigQuery compatibility mode.

<span className="feature-tag">Preview</span>

BigQuery [JSON functions](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions) in [BigQuery compatibility mode](/compatibility-modes/bigquery/overview). See also the Firebolt [JSON type](/reference-sql/data-types/json).

| Function                                                                                                                                                                                                                                                                                                                                                                                                                                           | Support       | Notes                                     |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :---------------------------------------- |
| [`JSON_VALUE`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_value)                                                                                                                                                                                                                                                                                                                                       | Supported     | Extracts a scalar as text.                |
| [`JSON_EXTRACT_SCALAR`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_extract_scalar)                                                                                                                                                                                                                                                                                                                     | Supported     | Alias of `JSON_VALUE`.                    |
| [`JSON_QUERY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_query)                                                                                                                                                                                                                                                                                                                                       | Supported     | Extracts a JSON subtree.                  |
| [`JSON_EXTRACT`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_extract)                                                                                                                                                                                                                                                                                                                                   | Supported     | Alias of `JSON_QUERY`.                    |
| [`JSON_QUERY_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_query_array)                                                                                                                                                                                                                                                                                                                           | Supported     |                                           |
| [`JSON_EXTRACT_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_extract_array)                                                                                                                                                                                                                                                                                                                       | Supported     |                                           |
| [`JSON_VALUE_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_value_array)                                                                                                                                                                                                                                                                                                                           | Supported     |                                           |
| [`JSON_EXTRACT_STRING_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_extract_string_array)                                                                                                                                                                                                                                                                                                         | Supported     |                                           |
| [`JSON_KEYS`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_keys)                                                                                                                                                                                                                                                                                                                                         | Supported     |                                           |
| [`JSON_OBJECT`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_object)                                                                                                                                                                                                                                                                                                                                     | Supported     |                                           |
| [`TO_JSON`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#to_json)                                                                                                                                                                                                                                                                                                                                             | Supported     |                                           |
| [`TO_JSON_STRING`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#to_json_string)                                                                                                                                                                                                                                                                                                                               | Supported     |                                           |
| [`BOOL`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#bool_for_json)                                                                                                                                                                                                                                                                                                                                          | Supported     | Typed accessor on a `JSON` value.         |
| [`INT64`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#int64_for_json)                                                                                                                                                                                                                                                                                                                                        | Supported     | Typed accessor on a `JSON` value.         |
| [`FLOAT64`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#float64_for_json)                                                                                                                                                                                                                                                                                                                                    | Supported     | Typed accessor on a `JSON` value.         |
| [`STRING`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#string_for_json)                                                                                                                                                                                                                                                                                                                                      | Supported     | Typed accessor on a `JSON` value.         |
| [`LAX_BOOL`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#lax_bool), [`LAX_INT64`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#lax_int64), [`LAX_FLOAT64`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#lax_float64), [`LAX_STRING`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#lax_string) | Supported     | Lenient typed accessors.                  |
| `JSON_ARRAY`, `JSON_ARRAY_APPEND`, `JSON_ARRAY_INSERT`, `JSON_FLATTEN`, `JSON_REMOVE`, `JSON_SET`, `JSON_STRIP_NULLS`, `JSON_TYPE`, `PARSE_JSON`                                                                                                                                                                                                                                                                                                   | Not supported | JSON construction and mutation functions. |

The typed integer accessors cover `INT64` and `INT32`. `UINT32` and `UINT64` accessors are not supported, because Firebolt has no unsigned type.

## Field access operator

The `->` operator reads a field from a JSON value:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
SELECT json_col -> 'user' -> 'id' FROM events;
```

## JSON path support

Paths support the root `$`, dot access (`.key`), bracket access (`['key']` or `["key"]`), and array index (`[n]`). Wildcards (`[*]`, `.*`), recursive descent (`..`), array slices, and filter expressions are not supported.
