oskarsh / Yin-Yang

Auto Nightmode for KDE, Gnome, Budgie, VSCode, Atom and more
MIT License
635 stars 52 forks source link

JSON files with comments or trailing commas are not supported #120

Closed rgeorgiev583 closed 7 months ago

rgeorgiev583 commented 2 years ago

I managed to reproduce this with the VSCode plugin, where the parsing of settings.json file failed. However, I suppose that it would be reproducible with the Firefox plugin as well (which also parses JSON files). When I execute yin-yang -t from the command line, the following error messages appear:

I suppose that is caused by limitations in the json Python module. It's up to the author to decide if it's feasible to use another module which supports these syntax features.

oskarsh commented 2 years ago

@rgeorgiev583 thanks for the bug report, I was not aware of this. However I will not going to fix this issue since this is not a breaking bug. If you are interested in collaboration feel free to take up that task.

flying-sheep commented 1 year ago

We’d need to use a JSON library with features like tomli for JSON-with-comments to properly support VS Code.

I don’t want this project to get rid of my comments and formatting in my VS Code config.

flying-sheep commented 1 year ago

What’s a “breaking bug”? This makes Yin-Yang incompatible with any VS Code config that uses comments or trailing commas, which is almost all of them.

l0drex commented 7 months ago

Duplicate of #84