diff --git a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h index 23fb506c220..12e1259d319 100644 --- a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h +++ b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h @@ -23,6 +23,13 @@ public: String getName() const override { return "JSONEachRowRowOutputFormat"; } +public: + /// Content-Type to set when sending HTTP response. + String getContentType() const override + { + return settings.json.array_of_rows ? "application/json; charset=UTF-8" : IRowOutputFormat::getContentType(); + } + protected: void writeField(const IColumn & column, const ISerialization & serialization, size_t row_num) override; void writeFieldDelimiter() override;