Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: comments being stripped out of json request body #4402

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

AndrewBastin
Copy link
Member

@AndrewBastin AndrewBastin commented Oct 4, 2024

This PR intends to fix the issue where the new JSONC system strips parts of URLs when it strips comments.

The removeComments function converts the following string erroneously:
Input:

{
  "hello": "https://echo.hoppscotch.io"
}

Output:

{
  "hello": "https
}

What's changed

  1. Add jsonc-parser NPM package as a dependency
  2. Use jsonc-parser implementation to strip comments instead of the current implementation.

@jamesgeorge007 jamesgeorge007 merged commit 8e91078 into patch Oct 4, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the fix/jsonc-strip branch October 4, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants