Hacker News new | ask | show | jobs
by suprjami 1253 days ago
I've tried three different themes, your website says the JSON is invalid for every one.

- Official Solarized Dark: https://github.com/microsoft/vscode/blob/main/extensions/the...

- Better Solarized Dark: https://github.com/edheltzel/vscode-better-solarized/blob/ma...

- This one: https://github.com/braver/vscode-solarized/blob/master/theme...

1 comments

Both first and second links contained comments in JSON, which is invalid.

I have now added fix to strip the comments, it should work now.

The last link does not have bare minimum requirement of a background color, see FAQ point 4: https://nice.github.io/themeforge/faq/#happy-little-accident...

Thanks for reporting.

Cool, thanks for the quick response!

Note the first link is the official VSC repo, nothing in there should fail. Can you automate testing of every theme shipped with Code? That would seem to be a good first step.

It might also be helpful to expand your error messages more. Your audience is developers here. Even if I'm not a JSON genius I can still read an error message and try to fix things myself.

Just because it is in the official VSC repo does not necessarily make it right, it is clearly an invalid JSON file and the error message is displayed.

Showing the exact line number of the error is beyond this project's scope for now.

I'm currently using https://www.npmjs.com/package/strip-json-comments to remove the comments if any.

There are many online linters available, please check https://jsonlint.com/

Welcome to Microsoft, where standards and interoperability are a vague suggestion.