I want VS Code to automatically correct spaces when saving a JSON file (I do not want this rule to be applied to any other types of files, but this is not crucial)
Example:
// before saving{"someField": "value"}// after saving{"someField": "value"}
I've searched the internet, and there are lots of articles on how to remove trailing spaces automatically when saving a file. But this is not the case
Solution that worked for me
I added this rule to my settings.json
:
"[json]": {"editor.formatOnSave": true}