Easy to reproduce:
### 20.3.13
```
SELECT 1
FORMAT JSON

{
        "meta":
        [
                {
                        "name": "1",
                        "type": "UInt8"
                }
        ],

        "data":
        [
                {
                        "1": 1
                }
        ],

        "rows": 1,

        "statistics":
        {
                "elapsed": 0.000203731,
                "rows_read": 1,
                "bytes_read": 1
        }
}
```

### 20.4.5
```
:) select 1 format JSON

SELECT 1
FORMAT JSON

{
        "meta":
        [
                {
                        "name": "1",
                        "type": "UInt8"
                }
        ],

        "data":
        [
                {
                        "1": 1
>>>>>>>> no closing bracket <<<<<<<<<<
        ],

        "rows": 1,

        "statistics":
        {
                "elapsed": 0.000771732,
                "rows_read": 1,
                "bytes_read": 1
        }
}
```
### master
```

SELECT 1
FORMAT JSON

{
        "meta":
        [
                {
                        "name": "1",
                        "type": "UInt8"
                }
        ],

        "data":
        [
                {
                        "1": 1
>>>>>>>> no closing bracket <<<<<<<<<<
        ],

        "rows": 1,

        "statistics":
        {
                "elapsed": 0.00103364,
                "rows_read": 1,
                "bytes_read": 1
        }
}

```

const auto & out_file = out_file_node.value.safeGet<std::string>()
                    out_file_buf.emplace(out_file, DBMS_DEFAULT_BUFFER_SIZE, O_WRONLY | O_EXCL | O_CREAT)
                    out_buf = &*out_file_buf
                    // We are riting to file, so default format is the same as in non-interactive mode.
                    if (is_interactive && is_default_format)
                        current_format = "TabSeparated"
                
                if (query_ith_output->format != nullptr)
                {
                    if (has_vertil_output_suffix)
                        thro Exception("Output format already specified", ErrorCodes::CLIENT_OUTPUT_FORMAT_SPECIFIED)
                    const auto & id = query_ith_output->format->as<ASTIdentifier &>()
                    current_format = id.name
                
            
            if (has_vertil_output_suffix)
                current_format = "Vertil"
            block_out_stream = context.getOutputFormat(current_format, *out_buf, block)
            block_out_stream->ritePrefix()
        
    
    void initLogsOutputStream()
    {
        if (!logs_out_stream)
        {
            WriteBuffer * b = out_logs_buf.get()
            if (!out_logs_buf)
            {
                if (server_logs_file.empty())
                {