v.20.12New Feature

Allow JSON Formatting for Named Tuples in ClickHouse

Allow formatting named tuples as JSON objects when using JSON input/output formats, controlled by the output_format_json_named_tuples_as_objects setting, disabled by default. #17175 (Alexander Kuzmenkov).
Allow formatting named tuples as JSON objects when using JSON input/output formats, controlled by the output_format_json_named_tuples_as_objects setting, which is disabled by default.

Why it matters

This feature enables more readable and structured JSON representation for named tuples by formatting them as JSON objects rather than arrays. It improves clarity and usability when exchanging data in JSON formats, making it easier for users to interpret and manipulate named tuple values.

How to use it

To enable this feature, set the output_format_json_named_tuples_as_objects setting to 1 (true). For example, include SET output_format_json_named_tuples_as_objects = 1 in your query or set it in the client/configuration to format named tuples as JSON objects.