-2

I want to write a chrome extension, so I need to write manifest.json, unfortunately, the IDE will not recognize the comments.

The documentation said:

It is a JSON-formatted file, with one exception: it is allowed to contain "//"-style comments.

So I am pretty sure added a comment for it is OK.

Is there any way to make the editor recognize the comments of manifest.json?

Carson
  • 3,764
  • 2
  • 23
  • 33
  • It seems that this self-answering question is not welcome, and I hope that those who voted against it can explain why. The first one who vote down that tells me, "Needs details or clarity." I have already edited it, and then I got a negative vote again. I don't understand what the reason is for voting. If this question is inappropriate, please leave a message, and I will delete the question. – Carson Jul 21 '21 at 16:33

1 Answers1

0

You can use the way as below,

{
  "//1": "comment 1",
  "//2": "comment 2",
  "id": "123"
}

see: https://stackoverflow.com/a/44700108/9935654

But I think the best way is to change the Recognized File Types to the json5

enter image description here

Carson
  • 3,764
  • 2
  • 23
  • 33