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

[Bug] Prettify not working if JSON body contains comments #1830

Closed
asonkeri opened this issue Mar 16, 2024 · 3 comments · Fixed by #1831
Closed

[Bug] Prettify not working if JSON body contains comments #1830

asonkeri opened this issue Mar 16, 2024 · 3 comments · Fixed by #1831

Comments

@asonkeri
Copy link
Contributor

Similarly to #1553 prettifying the JSON body fails if the body contains comments:
image

Tested on v1.11.0 on Windows 11

asonkeri added a commit to asonkeri/bruno that referenced this issue Mar 16, 2024
Added Microsoft's node-jsonc-parser library that is able to format json
with comments. Seems to handle bigints properly too.

It may be good to consider replacing existing `decomment` library with
`jsonc-parser` if its only use case is to decomment json.

Fixes usebruno#1830
@UlrichEckhardt
Copy link

Formally, comments are not part of JSON and many tools will tell you about that, too.

@asonkeri
Copy link
Contributor Author

As documented in #396, Bruno supports JSON with comments in the request body whether they are part of JSON spec or not.

helloanoop added a commit that referenced this issue Apr 9, 2024
Added Microsoft's node-jsonc-parser library that is able to format json
with comments. Seems to handle bigints properly too.

It may be good to consider replacing existing `decomment` library with
`jsonc-parser` if its only use case is to decomment json.

Fixes #1830

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
@helloanoop
Copy link
Contributor

This will go out in the 1.13.0 release. Please subscribe to Discord announcement channel to stay notified on the releases.

slowjoe007 pushed a commit to slowjoe007/bruno that referenced this issue Apr 10, 2024
Added Microsoft's node-jsonc-parser library that is able to format json
with comments. Seems to handle bigints properly too.

It may be good to consider replacing existing `decomment` library with
`jsonc-parser` if its only use case is to decomment json.

Fixes usebruno#1830

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
Its-treason pushed a commit to Its-treason/bruno that referenced this issue Apr 13, 2024
Added Microsoft's node-jsonc-parser library that is able to format json
with comments. Seems to handle bigints properly too.

It may be good to consider replacing existing `decomment` library with
`jsonc-parser` if its only use case is to decomment json.

Fixes usebruno#1830

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
lizziemac pushed a commit to lizziemac/bruno that referenced this issue May 4, 2024
Added Microsoft's node-jsonc-parser library that is able to format json
with comments. Seems to handle bigints properly too.

It may be good to consider replacing existing `decomment` library with
`jsonc-parser` if its only use case is to decomment json.

Fixes usebruno#1830

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
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 a pull request may close this issue.

3 participants