mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #32112 from FrankChen021/content-type
Returns Content-Type as application/json for JSONEachRow if output_format_json_array_of_rows is enabled
This commit is contained in:
commit
0372403ebd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user