When typing \n in the request body editor, Yaade stores it as a literal newline character (ASCII 10) instead of the two-character escape sequence \ + n. This results in invalid JSON being sent, because the JSON specification does not allow unescaped newline characters inside strings.
To Reproduce
- Create a new request in Yaade
- Set the method to
POST and the Content-Type header to application/json
- Enter the following body:
{
"text": "line one\nline two"
}
- Send the request
Expected behavior
The body is sent with \n as an escape sequence, resulting in valid JSON that the server can parse correctly.
Actual behavior
The body is sent with a literal newline character inside the string, producing invalid JSON. The server returns:
{
"error": "Invalid JSON",
"debug": "Control character error, possibly incorrectly encoded"
}
Workaround
Using PowerShell with ConvertTo-Json correctly escapes the newline and the request succeeds. This confirms the issue is in Yaade's body editor, not the server.
Environment
- Yaade version: latest (issue persists after updating)
- OS: Windows
- Browser: Chrome
Additional context
Tools like Postman and Bruno handle \n correctly as an escape sequence in the body editor. It would be great if Yaade did the same.
When typing
\nin the request body editor, Yaade stores it as a literal newline character (ASCII 10) instead of the two-character escape sequence\+n. This results in invalid JSON being sent, because the JSON specification does not allow unescaped newline characters inside strings.To Reproduce
POSTand the Content-Type header toapplication/json{ "text": "line one\nline two" }Expected behavior
The body is sent with
\nas an escape sequence, resulting in valid JSON that the server can parse correctly.Actual behavior
The body is sent with a literal newline character inside the string, producing invalid JSON. The server returns:
{ "error": "Invalid JSON", "debug": "Control character error, possibly incorrectly encoded" }Workaround
Using PowerShell with
ConvertTo-Jsoncorrectly escapes the newline and the request succeeds. This confirms the issue is in Yaade's body editor, not the server.Environment
Additional context
Tools like Postman and Bruno handle
\ncorrectly as an escape sequence in the body editor. It would be great if Yaade did the same.