Snowflake builds JSON as easily as it reads it:
OBJECT_CONSTRUCT('key', value, ...) makes an object from pairs. Keys whose value is NULL are left out.
ARRAY_AGG(x) collects a group's values into an array, and WITHIN GROUP (ORDER BY ...) sets their order.
PARSE_JSON('{"a": 1}') turns JSON text into a VARIANT you can read with paths.
ARRAY_SIZE(arr) counts the elements, and ARRAY_CONTAINS('gift'::VARIANT, arr) tests for a value. The value has to be cast to VARIANT first.
You'll use these to send nested data to an application, to build a small payload for an API, or to pack one row per customer with everything about them.