Answers for "allow comments in json file"

1

coc allow comments in json

The filetype need to be jsonc.
To make Vim treat all json files as jsonc:

```
augroup JsonToJsonc
    autocmd! FileType json set filetype=jsonc
augroup END
```
Or you can use a modeline (:help modeline) at the very top or bottom of an individual json file, to set the filetype to jsonc for only that file:

// vim: ft=jsonc
Posted by: Guest on January-17-2021
7

how to comments in json file

{
	"_comment": "comment text goes here...",
    "name": "your-app-name",
    ...
}
Posted by: Guest on January-30-2021

Browse Popular Code Answers by Language