The default shell on the latest macOS is Z shell and it seem to have issues with Resty:
The problem is that when running under zsh the special characters in the JSON responses are printed as is, so, for example, the new line character is actually printed to the terminal instead of being outputted like "first line\nsecond line". JSON spec requires all control characters to be escaped, so piping resty output to a JSON parser is impossible now. E.g. GET /some/api | jq will fail.
Given that curl works fine with Z, the issue is probably on the Resty side.
The default shell on the latest macOS is Z shell and it seem to have issues with Resty:
The problem is that when running under
zsh
the special characters in the JSON responses are printed as is, so, for example, the new line character is actually printed to the terminal instead of being outputted like"first line\nsecond line"
. JSON spec requires all control characters to be escaped, so pipingresty
output to a JSON parser is impossible now. E.g.GET /some/api | jq
will fail.Given that curl works fine with Z, the issue is probably on the Resty side.
Thank you