Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSONC / allow comments in JSON per other Microsoft products #2292

Closed
mikemaccana opened this issue Aug 6, 2019 · 4 comments
Closed

Use JSONC / allow comments in JSON per other Microsoft products #2292

mikemaccana opened this issue Aug 6, 2019 · 4 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered

Comments

@mikemaccana
Copy link
Contributor

Windows 10.0.18362.0, Terminal Preview 3.

I needed to add a comment explaining why I'd disabled a config option

image

This is correct, comments aren't permitted in JSON. Terminal, like vsCode, should use JSONC (whether it has a .json or .jsonc extension):

image

I know Code and Terminal are different teams but consistency would be good here, and comments are useful.

@mikemaccana mikemaccana added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 6, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 6, 2019
@zadjii-msft
Copy link
Member

We actually do allow comments in the json file as of #1005. Dunno why VS Code is tagging the file like that, but they're definitely allowed.

@zadjii-msft zadjii-msft added the Resolution-Answered Related to questions that have been answered label Aug 6, 2019
@mikemaccana
Copy link
Contributor Author

mikemaccana commented Aug 6, 2019

OK I'll file it with vscode. 👍🏼

@flying-sheep
Copy link

It highlights it like this because things with a .json extension are supposed to be JSON and not JSONC. Adding an exception in VS Code will only fix it there, not for any other editor. The file should be renamed to reflect its real type.

@wetterkrank
Copy link

@zadjii-msft The settings.json file of Windows Terminal is not a valid JSON, so it will alert linters in most code editors. Why don't you rename the file to settings.jsonc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

4 participants