JSON Scalar

json_object()

Reference: DuckDB 2.0.0

Arguments & returns

json_object(…)

Scalar
Overload link … Varargs Returns
#01 ANY JSON

… accepts a variable number of arguments of the type shown.

In other engines

Snowflakeobject_construct_keep_null()

OBJECT_CONSTRUCT_KEEP_NULL('key_1', 'one', 'key_2', NULL)
In DuckDB
JSON_OBJECT('key_1', 'one', 'key_2', NULL)

SQLGlot example ↗