Sometimes we need to use comments in a JSON file in the VS Code editor.
But VS Code doesn’t like that.
It throws this error.

Here’s how to fix that error:
- Click on “JSON” on your status bar at the bottom of your VS Code editor
- a menu appears near the search bar up above.
- click on ‘Configure File Association for ‘.json’…
- Type “JSONC” and choose “JSON with Comments” option.
- That’s all! Your error underlinings would now be gone.

