mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
returns content-type as json if possible
Signed-off-by: frank chen <frank.chen021@outlook.com>
This commit is contained in:
parent
1f9b542ee9
commit
c49a7251ed
@ -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