In VS Code, disable error "Comments are not permitted in JSON"

Solution 1:

Follow these steps:

  1. Click on the letters JSON in the bottom right corner. (A drop-down will appear to "Select the Language Mode.")
  2. Select "Configure File Association for '.json'..."

enter image description here

  1. Type jsonc and press Enter.

enter image description here

If you only want to disable the error message for a single file, skip step #2.

Solution 2:

Add this to your User Settings:

"files.associations": {
    "*.json": "jsonc"
},

If you don't already have a user settings file, you can create one. Hit Ctrl+, or +, (that's a comma) to open your settings, then hit the Open Settings (JSON) button in the upper right. It looks like this: the button's icon; a page with a little curved arrow over it