JSONC Comments
JSONC (JSON with Comments) is the JSON superset defined for VS Code, allowing // and /* */ comments plus trailing commas, used for configuration files.
Purpose
To support comments in VS Code configuration files so settings.json, launch.json, and the like can carry explanations.
Mechanism
A JSONC parser skips // and /* */ comments and tolerates trailing commas on top of standard JSON; the rest of the syntax is identical. VS Code and TypeScript tsconfig use it.
Use cases
- VS Code configuration
- tsconfig.json
- ESLint configuration