[Fix #8673] Fix the JSON parse error when specifying `--format=json` and `--stdin` by koic · Pull Request #8694 · rubocop-hq/rubocop

Fixes #8673. This PR returns only JSON result when specifying --format=json and --stdin to fix the JSON parse error. Before submitting the PR make sure the following are checked: Wrote good comm...