aaronpowell / vscode-profile-switcher

A VS Code extension for switching settings easily
https://marketplace.visualstudio.com/items?itemName=aaronpowell.vscode-profile-switcher&wt.mc_id=profileswitcher-github-aapowell
MIT License
177 stars 19 forks source link

Trailing commas in `settings.json` #8

Closed zingmane closed 5 years ago

zingmane commented 5 years ago

Saving profile runs on error if the config has trailing commas any where in the settings.json. The error message was also very shortened, so I had to look a while to find the issue. Unfortunately the JSON specification does not allow a trailing commas, but code has no problem with it, so I think the profile switscher shouldn't either.

This is the snippet that caused the error.

"files.exclude": { "**/.git": true, },

aaronpowell commented 5 years ago

Hmm, I use the same parser that Code itself uses to read the JSON in so I'm surprised that this results in an error.

aaronpowell commented 5 years ago

Fixed in release 0.3.1