

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# JSON\$1SERIALIZE function
<a name="JSON_SERIALIZE"></a>

The JSON\$1SERIALIZE function serializes a `SUPER` expression into textual JSON representation to follow RFC 8259. For more information on that RFC, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc8259).

The `SUPER` size limit is approximately the same as the block limit, and the `VARCHAR` limit is smaller than the `SUPER` size limit. Therefore, the JSON\$1SERIALIZE function returns an error when the JSON format exceeds the VARCHAR limit of the system. To check the size of a `SUPER` expression, see the [JSON\$1SIZE](r_json_size.md) function.

## Syntax
<a name="JSON_SERIALIZE-synopsis"></a>

```
JSON_SERIALIZE(super_expression)
```

## Arguments
<a name="JSON_SERIALIZE-arguments"></a>

 *super\$1expression*  
A `SUPER` expression or column.

## Return type
<a name="JSON_SERIALIZE-return"></a>

`VARCHAR`

**Note**  
The returned VARCHAR value is always a non-null JSON string. If *super\$1expression* is NULL, JSON\$1SERIALIZE returns the JSON string `'null'`.

## Examples
<a name="JSON_SERIALIZE-examples"></a>

To serialize a `SUPER` value to a string, use the following example.

```
SELECT JSON_SERIALIZE(JSON_PARSE('[10001,10002,"abc"]'));
   
+---------------------+
|   json_serialize    |
+---------------------+
| [10001,10002,"abc"] |
+---------------------+
```