-
Notifications
You must be signed in to change notification settings - Fork 854
Remove escaped whitespace characters from JSON bodies, in request code generator #5832
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
Comments
Relatedly: in languages that have "heavy" or "raw" strings like Go (``), Rust ( |
This is affecting our documentation through postman as well. |
user reports this is an issue as well. |
It looks like this is still affecting documentation. Since the bug is still open, can it be addressed here? |
I have created two PRs to fix this issue in Javascript/Nodejs and Python codegens. |
Hey @JP-from-Postman @stcalica @ryparker @Lucretiel !! We have made some fixes around unwanted characters in JS/Node and Python codegens as mentioned above. Could you please try the latest version postman app and see if you still face these issues? |
Thank you the fixes are working grate , did you continue to another language like C#? |
Hi, this problem is still happening in version 8.10.0. JSON body content in C# code includes new line characters in the code snippet. If I change the code snippet from C# - RestSharp to cURL, then the JSON content will be formatted correctly, without new line characters. This also affects the Postman documentation examples. |
[User feedback, submitted by Postman Support]
Please read through the guidelines before creating a new issue.
Describe the bug
For some languages, the Generate Code Snippets tool includes newlines (\n) and tabs (\t) for JSON request body strings. User feedback is that these may be superfluous, and can be omitted from code generation. See screenshot below:
To Reproduce
Steps to reproduce the behavior:

3. Open Code Generator for request, select a language where \n and \t show up:Expected behavior
Newline and tab characters for JSON body strings these languages could be omitted (?
App information (please complete the following information):
The text was updated successfully, but these errors were encountered: