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

Zero Fractions are removed in Response Preview #171

Closed
marcel-benthin opened this issue Mar 9, 2018 · 5 comments
Closed

Zero Fractions are removed in Response Preview #171

marcel-benthin opened this issue Mar 9, 2018 · 5 comments

Comments

@marcel-benthin
Copy link

  • VSCode Version: 1.21.0
  • OS Version: Windows 10 Pro 16299.248
  • REST Client Version: 0.17.0

Steps to Reproduce:

  1. Request a API that returns a JSON where numbers are returned including a .0 fraction
  2. The Preview doesn’t show the .0. If I save/open the response the raw response is saved and the zero fraction is presevered

I know it’s not a big issue just a bit annoying for me while testing my API.

@Huachao
Copy link
Owner

Huachao commented Mar 12, 2018

@marcel-benthin nice suggestion, I will consider this carefully. The root cause is that in when prettify the response body, there's no way to distinguish integer and floating number.

@marcel-benthin
Copy link
Author

Thanks, yeah, I figured.
The problem is that JSON doesn’t distinguish between those two types (or doesn’t have them at all) and therefore the .0 is not needed.

@Huachao
Copy link
Owner

Huachao commented Mar 12, 2018

I think we can solve this by using a JSON tokenizer and parser

@Huachao
Copy link
Owner

Huachao commented Mar 29, 2018

@marcel-benthin you can try the latest version 0.18.0 to verify this

@marcel-benthin
Copy link
Author

way ahead of you… already tried it when it updated this morning. It’s awesome.
I also like the folding.

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants