[PR #4335] [MERGED] feat: support for comments on application/json request body #4757

Closed
opened 2026-03-17 02:15:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4335
Author: @anwarulislam
Created: 9/9/2024
Status: Merged
Merged: 10/1/2024
Merged by: @jamesgeorge007

Base: nextHead: feat/jsonc


📝 Commits (10+)

📊 Changes

7 files changed (+537 additions, -72 deletions)

View changed files

📝 packages/hoppscotch-common/package.json (+1 -0)
📝 packages/hoppscotch-common/src/components/http/RawBody.vue (+2 -2)
📝 packages/hoppscotch-common/src/composables/codemirror.ts (+11 -4)
packages/hoppscotch-common/src/helpers/editor/linting/jsonc.ts (+45 -0)
packages/hoppscotch-common/src/helpers/jsoncParse.ts (+425 -0)
📝 packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts (+14 -2)
📝 pnpm-lock.yaml (+39 -64)

📄 Description

Closes HFE-574

This PR introduces support for comments in the ⁠application/json request body.

What's changed

Currently, comments are not allowed in ⁠application/json request bodies, making it difficult to add explanatory notes or temporarily disable parts of the JSON structure. This can lead to less readable and maintainable code, especially for large or complex JSON payloads.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4335 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 9/9/2024 **Status:** ✅ Merged **Merged:** 10/1/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat/jsonc` --- ### 📝 Commits (10+) - [`bc0de45`](https://github.com/hoppscotch/hoppscotch/commit/bc0de455c37603fbb5e3e4b249c85df43101b184) feat: jsonc package added - [`bd095ed`](https://github.com/hoppscotch/hoppscotch/commit/bd095ed800b85956cef4861db16bfc8d37967b59) chore: codemirror option extended - [`7606b96`](https://github.com/hoppscotch/hoppscotch/commit/7606b969114a12596d36d364e38ee99b8d6f7fc1) feat: jsonc linter added - [`a8dacde`](https://github.com/hoppscotch/hoppscotch/commit/a8dacde53339984d76e860820c67c63177ee2262) chore: clean up - [`b7900d4`](https://github.com/hoppscotch/hoppscotch/commit/b7900d43531dcc04caa8a34de69d4b020a7d83f6) chore: clean up - [`dda961a`](https://github.com/hoppscotch/hoppscotch/commit/dda961a509b5adacc6fc0ee7f23b808d6cb8f070) chore: clear - [`5a741d6`](https://github.com/hoppscotch/hoppscotch/commit/5a741d64c0c28fc6e13d6c188bf7baf1674b0907) chore: clean up - [`114373c`](https://github.com/hoppscotch/hoppscotch/commit/114373c3eeeb9d16421cadf20cb2954a8e277ff2) fix: body content issue - [`729e7e9`](https://github.com/hoppscotch/hoppscotch/commit/729e7e9191000f5498cbe83016957bfcaa8f40b1) feat: allow trailing comma - [`a1b1136`](https://github.com/hoppscotch/hoppscotch/commit/a1b11369400942c77e747be08cb3abd393f94109) feat: remove trailing commas ### 📊 Changes **7 files changed** (+537 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/package.json` (+1 -0) 📝 `packages/hoppscotch-common/src/components/http/RawBody.vue` (+2 -2) 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+11 -4) ➕ `packages/hoppscotch-common/src/helpers/editor/linting/jsonc.ts` (+45 -0) ➕ `packages/hoppscotch-common/src/helpers/jsoncParse.ts` (+425 -0) 📝 `packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts` (+14 -2) 📝 `pnpm-lock.yaml` (+39 -64) </details> ### 📄 Description Closes HFE-574 This PR introduces support for comments in the ⁠application/json request body. ### What's changed Currently, comments are not allowed in ⁠application/json request bodies, making it difficult to add explanatory notes or temporarily disable parts of the JSON structure. This can lead to less readable and maintainable code, especially for large or complex JSON payloads. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:15:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4757
No description provided.