-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Request fails with JSON files containing escape sequences for line feed codes #496
Comments
@k2tzumi Thank you! |
I noticed a difference in the handling of carriage return ( |
I found the cause of this bug. When a map variable is given as follows, post:
body:
application/json: {{ vars.someMap }} It seems that it happened to work correctly only if it does not contain newlines ( This seems to be the current behavior of k1LoW/expand. https://github.com/k1LoW/expand/blob/dd65a4a0fe0484196290c97edd24579b9832ac38/expand.go#L63-L65 It seems to need some adjusting for everything to work well. |
Fixed at #497. Also, we will continue to watch goccy/go-yaml's handling of |
If you try to send a request for a json file that contains a newline code in the json value, the json itself will be sent as a string.
json files containing line feed codes
https://github.com/k2tzumi/runn/blob/5cbb9f68afb2bc3344ec5aec094755ddeaa4f3dd/testdata/newline.json
runbook that calls the json file
https://github.com/k2tzumi/runn/pull/20/files#diff-529bf6e17bec3f0713aa61973fdc8ff6ad93c059f1ba1650a90e498e582ab934
result
https://github.com/k2tzumi/runn/actions/runs/4901420664/jobs/8752680939#step:7:132
debug
json body is not json!
For json without newline code
Essentially, it's correct to leave the json
The text was updated successfully, but these errors were encountered: