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.
Example libraries:
In a debugging session with @danbarr it was discovered that
thvcouldn't read his VS Codesettings.jsonbecause 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.jsonunmarshalling, use a JSON Go library that supports comments in JSON? Or perhaps write some logic to ignore the comments syntax in thesettings.jsonfile. This eases the burden on those who havesettings.jsonfiles with comments in them and not requiring them to rewrite them to usethv.Example libraries: