scap has functionality to lint JSON and PHP files as a last-ditch safety measure to prevent invalid JSON or PHP files from being synced to the cluster. However, it doesn't work if you are syncing *just* that invalid file.
scap sync-file invalid.json, will end up calling os.walk('invalid.json') which doesn't work since you can only walk directories, so no file is linted at all.