We use the /rest/servicedeskapi/request//comment API to display JSD ticket comments and rely on the renderedBody.html attribute in the payload to display the comment. While the renderedBody generally handles also code formatting (double curly brackets), it seems to fail if the code itself contains a curly bracket. See screenshot: