Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteUse JSON when a file must work with general-purpose JSON parsers or cross-system data contracts. Use JSONC when the specific application that reads the file explicitly supports it and comments will help people maintain the configuration. A .json extension does not prove that a file is strict JSON—or that a particular program accepts JSONC. Choose based on the actual consumer and its documented syntax.
The practical difference
JSON is a standardized data-interchange format. JSONC, meaning “JSON with Comments,” extends JSON syntax with JavaScript-style comments. That extension is useful for some human-maintained configuration files, but it is not automatically accepted by every JSON parser.
As an Amazon Associate I earn from qualifying purchases.
| Decision | JSON | JSONC |
|---|---|---|
| Comments | Comments are not part of the JSON grammar (RFC 8259). | Allows // line comments and /* ... */ block comments (JSONC draft specification). |
| Parser compatibility | Use when the consumer requires standard JSON. | Requires explicit support by the consuming application; JSON parsers may accept extensions, but are not required to. |
| Maintained configuration | Keep explanations outside the JSON text or represent them as data where the application expects data fields. | Comments can explain settings. Visual Studio Code uses JSONC for several of its own configuration files. |
| Trailing commas | Not valid in standard JSON. | Some JSONC parsers accept them, but this is optional and behavior differs across parsers. |
| Filename and media type | RFC 8259 registers .json and application/json for JSON text. |
The JSONC draft recommends .jsonc and application/jsonc; follow the consuming tool’s requirements. |
What strict JSON allows
JSON is a defined interchange format
RFC 8259 is the IETF Internet Standard for JSON. It defines a grammar for JSON text and registers the application/json media type and .json file extension. A standard JSON document uses JSON values and syntax, not JavaScript source-code features. In particular, comments and trailing commas are outside the JSON grammar.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Comments do not become valid because a file is configuration
A configuration file may be intended for people to edit, but the parser still decides what syntax it accepts. If the application reads the file with a strict JSON parser, a comment can make an otherwise understandable configuration fail to parse. The fact that a person can read the file, or that an editor colors its comments, does not change the format contract.
#1 Best Overall
RFC 8259 states: “A JSON parser MUST accept all texts that conform to the JSON grammar.” The requirement concerns conforming JSON; it does not require a parser to accept comments or other extensions. The RFC also allows implementations to accept non-JSON forms, so extension handling is an implementation choice rather than a guarantee.
What JSONC adds—and what it does not
Line and block comments
The JSONC specification defines JSONC as an extension of JSON that adds JavaScript-style comments. A line comment starts with //; a block comment starts with /* and ends with */. The specification says comments are ignored during parsing: removing them should leave the same JSON value representation. In other words, comments are useful to maintainers, but are not additional configuration values delivered to the application as part of that parsed representation.
JSONC is not simply “JSON that every tool understands”
JSONC support belongs to the consuming tool’s parser or configuration contract. One application may accept comments while another rejects the same text. The JSONC specification page labels its specification a draft, so its recommendations are not a universal filename or media-type policy adopted by every tool. For a particular configuration, the application’s documentation is the deciding authority.
How the same setting looks in each format
Suppose an application expects a port number and a Boolean enabled value. A strict JSON representation could be:
{
"port": 8080,
"enabled": true
}
A JSONC configuration could add a maintainer-facing explanation:
{
// Port used by the local service
"port": 8080,
"enabled": true /* Set to false to disable the service */
}
The second example works only if the reader of the file accepts JSONC comments. A strict JSON parser may reject it before the application can use either value. If the file needs to be sent to an API, imported by another system, or read by a generic JSON library, remove the comments or keep the explanatory notes elsewhere.
Do not infer that JSONC always allows a trailing comma. This is a separate parser behavior from comment support. For portability, write the final property without a comma:
{
"port": 8080,
"enabled": true
}
Choose according to the program that reads the file
Choose strict JSON for exchanged or contract-bound data
Use strict JSON when a file is exchanged between systems, consumed by general-purpose JSON software, or governed by a contract that requires standard JSON. The same rule is the safest default when you do not control the parser or cannot confirm its extension behavior. Keep comments out of the JSON text; put documentation in a companion document or another location supported by the application.
Choose JSONC for explicitly supported, human-maintained configuration
Use JSONC when the tool’s documentation says it accepts JSONC and comments will help maintainers understand non-obvious choices. This is common in editor or development-tool configuration, but it should not be generalized to every file ending in .json. Confirm the supported syntax for the exact file and application version where relevant.
When you cannot identify the parser
Do not decide from the extension or editor alone. Find the program, library, build step, or service that actually opens the file, then check its configuration documentation. If that cannot be established, strict JSON avoids relying on an undocumented extension. A file can be edited in an editor with JSONC assistance and still need to remain valid JSON for its eventual consumer.
Why Visual Studio Code is a notable example
Visual Studio Code’s JSON documentation says its JSONC mode is used for selected VS Code configuration files, including settings.json, tasks.json, and launch.json. In that mode, line and block comments are accepted, and trailing commas are accepted with warnings. These filenames illustrate why a .json suffix does not establish which grammar a particular application uses.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The Visual Studio Code JSON language server describes documents in json mode as parsed and validated according to the JSON specification, while jsonc documents additionally accept single-line and block comments. Its README characterizes JSONC as a VS Code-specific format intended for VS Code configuration files. That distinction is about the language mode and consumer, not a universal property of every file with a JSON-looking name.
Rank #3
TypeScript’s handbook describes tsconfig.json as the file identifying a TypeScript project’s root and specifying root files and compiler options. Its name alone is not a reliable guide to which parser behavior applies. Check the TypeScript tool’s configuration contract rather than assuming that every file named .json is parsed in exactly the same way.
Keep editor validation separate from runtime parsing
Visual Studio Code can provide IntelliSense, formatting, navigation, and structural and value validation for JSON and JSONC using JSON Schema. Its documentation says the shipped JSON support covers schema drafts 4 through 7, with limited support for drafts 2019-09 and 2020-12. These editor features can help catch mistakes, but they do not prove that a different program will accept the file’s syntax or schema.
Visual Studio Code also supports schema association through settings and extensions. Adding a $schema property directly to a configuration file is another option only when the consumer permits that property: it changes the data, and the application may not expect it. Prefer editor settings or a supported association mechanism when the consuming format must remain unchanged.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems- Editor check: Does the editor understand the selected language mode and provide useful diagnostics?
- Consumer check: Does the application that reads the saved file accept its comments, commas, properties, and values?
- Contract check: Does the file or transmitted message need to conform to standard JSON or a particular schema?
Filename and media type choices
For standard JSON, RFC 8259 registers .json for JSON text and application/json as its media type. The JSONC draft recommends using .jsonc for JSONC files and avoiding .json unless a mode line identifies the file. It also recommends application/jsonc when transmitting JSONC, and warns against using application/json for JSONC because strict JSON consumers may reject comments or trailing commas.
These JSONC points are draft recommendations, not a rule that overrides a tool’s required name or transport contract. If a specific application requires a file named settings.json and documents that it parses the file as JSONC, follow that convention. For a standalone JSONC file where you control the name, .jsonc makes the intended syntax clearer. For network transmission, use the media type expected by the receiver; do not label JSONC as standard JSON merely because its underlying values resemble JSON.
A practical selection and validation workflow
- Identify the consumer. Find the actual application, service, library, or build tool that reads the file. An editor that opens it is not necessarily its runtime consumer.
- Check its documented grammar. Look for explicit support for JSONC or comments, and verify whether trailing commas are supported. Do not infer support from the filename.
- Check the file’s purpose. If it crosses system boundaries or must meet a standard JSON contract, keep it strict JSON. If it stays within a tool that explicitly supports JSONC, comments may be appropriate for maintainers.
- Use the right filename where you control it. Prefer
.jsonfor standard JSON and consider.jsoncfor standalone JSONC, subject to the consuming tool’s required filename. - Validate with the real consumer. An editor diagnostic is helpful, but run the application or its documented validation path against the saved file. This checks the parser that matters.
- Test portability if the file moves. Remove comments and trailing commas before handing the file to a strict JSON consumer, or confirm that every intended reader supports the extensions.
- Honor the transport contract. For transmitted data, use the media type expected by the receiver. The JSONC draft recommends
application/jsoncfor JSONC andapplication/jsonfor standard JSON.
Common failures and how to diagnose them
“Unexpected token” at a comment
The parser may be treating the document as strict JSON. Check which program produced the error and whether it has a JSONC mode or setting. If the consumer requires JSON, remove the comments and store their explanations separately; if it supports JSONC, ensure the file is being loaded through that supported configuration path.
A trailing comma works in one tool but fails in another
Comment support does not guarantee trailing-comma support. The JSONC specification does not require parsers to accept trailing commas; it notes that jsonc-parser rejects them by default unless configured. Visual Studio Code accepts trailing commas in JSONC mode but generally warns about them. Remove trailing commas when files need to travel among different tools.
The editor accepts the file but the application rejects it
Editor syntax support and runtime parser behavior are separate. Confirm whether the editor is in JSON or JSONC mode, then validate using the actual consuming application. Also check that the file’s name and location match what the application expects; editor coloring alone cannot settle those questions.
A schema key causes an unexpected configuration value
A $schema key embedded in a file is still part of the document’s data. If the consumer does not recognize or allow it, use the editor’s schema-association settings or an extension-supported association instead of adding the key to the runtime configuration.
Moving a configuration between tools
Before reusing a JSONC file outside the application that owns it, check each stage that will read or transform it. A file may pass through an editor, a build step, a script, and then a service; support in one stage does not establish support in the next. If any stage requires standard JSON, comments can cause parsing to fail. Convert or remove them before that boundary, and validate the result with the intended consumer.
When you cannot change the required filename or parser, keep the format required by that tool even if another convention looks clearer. Conversely, if you own a standalone file and can choose its name, the JSONC draft’s .jsonc recommendation signals that comments are part of the intended syntax. Filename, language mode, and parser behavior should agree where the tool allows you to control them.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Comments also have a narrow role: they explain intent to people, but they do not become values in the parsed JSON representation. If a consumer needs an explanation as data, a JSONC comment will not supply it. Use only fields the application expects, or document the setting separately. This distinction helps avoid treating comments as a substitute for a supported configuration option or a data contract.
Bottom line
Strict JSON is the interoperable choice when a parser or contract expects standard JSON. JSONC is a practical authoring format for configurations whose consumer explicitly supports comments. Confirm the consumer first, keep trailing commas out when portability matters, and treat filenames and editor features as clues—not proof—of parser behavior.
Frequently Asked Questions
Can JSON files have comments?
Not under the standard JSON grammar in RFC 8259. A tool may accept comments as an extension, but that behavior is optional. If comments are needed, confirm that the actual consumer supports JSONC rather than assuming a .json file can contain them.
Does JSONC always allow trailing commas?
No. The JSONC draft does not require trailing-comma support, and parser behavior differs. Visual Studio Code accepts trailing commas in its JSONC mode but generally warns about them; jsonc-parser rejects them by default unless configured. Leave them out when portability matters.
Free tools Windows power users keep installed
One-click scans. No signup required.
Does a .json extension mean the file is strict JSON?
No. Visual Studio Code uses JSONC for selected configuration files such as settings.json, tasks.json, and launch.json. The extension does not establish which syntax the consuming application accepts; check that tool’s documentation.
Which format should I use for a file sent between systems?
Use strict JSON when the recipient expects standard JSON or when the file must work with general-purpose JSON parsers. If a particular consumer explicitly accepts JSONC, follow its contract; for transmitted JSONC, the JSONC draft recommends application/jsonc, while RFC 8259 registers application/json for JSON.
How can I tell whether my parser supports JSONC?
Identify the program or library that actually reads the saved file and check its documented configuration syntax. Then validate the file through that consumer’s documented path. Editor highlighting or successful editing alone does not prove that the runtime parser accepts comments.
The Bottom Line
Choose according to the consumer, not the extension: strict JSON for standard parser compatibility and data contracts; JSONC only when the reading tool explicitly supports it. Avoid trailing commas if a file may move between tools, and validate with the actual consumer.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




