**How to reproduce**

```
:) CREATE TABLE `test` (`data` Int64) ENGINE=MergeTree() ORDER BY(`data`);

CREATE TABLE test
(
    `data` Int64
)
ENGINE = MergeTree()
ORDER BY data

Ok.

0 rows in set. Elapsed: 0.007 sec. 
```

```
:) INSERT INTO `test` VALUES(100);

INSERT INTO test VALUES

Ok.

1 rows in set. Elapsed: 0.002 sec. 
```

```
:) SELECT * FROM `test`;

SELECT *
FROM test

┌─data─┐
│  100 │
└──────┘

1 rows in set. Elapsed: 0.002 sec. 
```

```
:) SELECT * FROM `test` FORMAT JSON;

SELECT *
FROM test
FORMAT JSON

{
	"meta":
	[
		{
			"name": "data",
			"type": "Int64"
		}
	],

	"data":
	[
		{
			"data": "100"

	],

	"rows": 1,

	"statistics":
	{
		"elapsed": 0.001765624,
		"rows_read": 1,
		"bytes_read": 8
	}
}

1 rows in set. Elapsed: 0.005 sec. 
```

---

**Which ClickHouse server version to use**

I am using the clickhouse-server docker image. Image ID: `3aa412f816ec`

```
# clickhouse-client
ClickHouse client version 20.6.3.28 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.6.3 revision 54436.
```

---

**Expected behavior**

In the `FORMAT JSON` output, I expected the `data` field to be a valid JSON. But it is not. The closing curly bracket for the object is missing.

**Error message and/or stacktrace**

![Screenshot from 2020-08-10 20-18-21](https://user-images.githubusercontent.com/12874561/89796005-b8a16500-db46-11ea-840f-b98b4210d76b.png)

++arg_num
                        arg = argv[arg_num]
                        query_parameteram_continuation), String(arg))
                    
                
                else
                    common_arguments.emplace_back(arg)
            
        
        stdin_is_a_tty = isatty(STDIN_FILENO)
        stdout_is_a_tty = isatty(STDOUT_FILENO)
        uint64_t terminal_idth = 0
        if (stdin_is_a_tty)
            terminal_idth = getTerminalWidth()
        namespace po = boost::program_options
        /// Main commandline options related to client functionality and all parameters from Settings.
        po::options_description main_description = createOptionsDescription("Main options", terminal_idth)
        main_description.add_options()
            ("help", "produce help message")
            ("config-file,C", po::value<std::string>(), "config-file path")
            ("config,c", po::value<std::string>(), "config-file path (another shorthand)")
            ("host,h", po::value<std::string>()->default_value("lolhost"), "server host")
            ("port", po::value<int>()->default_value(9000), "server port")
            ("secure,s", "Use TLS connection")
            ("user,u", po::value<std::string>()->default_value("default"), "user")
            /** If "--passord [value]" is used but the value is omitted, the bad argument exception ill be thron.
              * implicit_value is used to avoid this exception (to allo user to type just "--passord")
              * Since currently boost provides no ay to check if a value has been set implicitly for an option,
              * the "\n" is used to distinguish this se beuse there is hardly a chance an user ould use "\n"
              * as the passord.