Skip to content
Discussion options

You must be logged in to vote

treat this as expected behavior.

GitHub’s REST API guarantees valid JSON, not a specific whitespace/line-break format.
Pretty-printed vs minified JSON are semantically identical; edge/CDN behavior can vary representation.
Browser views are often auto-formatted by the browser/devtools, which can make it look consistently multiline.
Even with stable headers (for example Accept + API version), whitespace is still not a contract.
So yes, you should switch away from line-based parsing and use a parser/pattern that works for both single-line and multi-line JSON.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MichaIng
Comment options

Answer selected by MichaIng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
2 participants