You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use of Different JSON Library for Unmarshalling JSON for VS Code Settings #117
In a debugging session with @danbarr it was discovered that thv couldn't read his VS Code settings.json because it had comments in them (// comment) and trailing commas in single line arrays and objects. Typically JSON doesn't have comments, but VS Code supports them, and sometimes, extensions you install add the comments themselves.
In case of users having comments in their VS Code files, should we, in the case for settings.json unmarshalling, use a JSON Go library that supports comments in JSON? Or perhaps write some logic to ignore the comments syntax in the settings.json file. This eases the burden on those who have settings.json files with comments in them and not requiring them to rewrite them to use thv.
Yes after cleaning my config of all commented lines and trailing commas (which VS Code also supports and routinely adds), thv was able to insert the mcp section as expected.
Secondary issue: when it wrote back my config, it had re-ordered every entry alphabetically 🙃
Activity
danbarr commentedon Apr 7, 2025
After removing the commented lines, I hit a second validation error. This one I can't pin down:
ChrisJBurns commentedon Apr 7, 2025
The above seemed to have been a trailing comma on single line objects. Will wait for @danbarr to confirm if that was the last of the issues.
danbarr commentedon Apr 7, 2025
Yes after cleaning my config of all commented lines and trailing commas (which VS Code also supports and routinely adds), thv was able to insert the
mcpsection as expected.Secondary issue: when it wrote back my config, it had re-ordered every entry alphabetically 🙃
JAORMX commentedon Apr 10, 2025
This will be covered by #156 . Let's make sure the work there addresses this. cc @dmjb
danbarr commentedon Apr 15, 2025
Looks good @ChrisJBurns !