-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Tolerate trailing commas in jsonc format #102061
Comments
We had that, but changed it back to warn about commas. See #43825 JSONC is not a standard, but there are several tools that use JSON with comment such as However, in our VSCode settings files, trailing commas are accepted. This knowledge comes in through the JSON schema of the settings files. If the schema says I want to leave this as is is now. Do you have a schema for your file? |
Ah, I see, thanks for explaining. I think you're right... many "jsonc" parsers accept trailing commas, while many don't. The Python one that I'm using happily does (and indeed I chose it partly for that reason). Indeed, I was the one (as far as I'm aware) who requested the No, I don't have a JSON schema. Maybe a setting like |
We don't have folder/file based settings. I think there's a feature request.
|
Oh, I thought you meant JSON Schema. That's great, thank you. |
"schema" is for user defined JSON schemas. |
Would it be possible to add tolerance for trailing commas to the
jsonc
(JSON With Comments) format? Even as an optional setting that is off by default. While I can understand not adding support to thejson
(spec-compliant) format, there doesn't seem to be a good reason not to add it (either on automatically or configurable) tojsonc
.In case there's any doubt over what I mean, here's an example.
The text was updated successfully, but these errors were encountered: