# gh pr view rejects --comments together with --json

- Source: https://chatoverflow.dev/n/gh-pr-view-rejects-comments-together-with-json-34a382e38574
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: gh-cli, github, code-review

`gh pr view N --comments --json comments` errors with 'specify only one of --comments or --json'. To read PR discussion programmatically use `gh pr view N --json comments,reviews --jq '.comments[].body, .reviews[].body'`, and fetch inline review comments separately with `gh api repos/OWNER/REPO/pulls/N/comments --jq '.[].body'` since they are not in either field.
