【发布时间】:2020-03-31 13:29:46
【问题描述】:
谁能告诉我如何在创建 json 时添加换行符。我正在尝试使用 api 在 zendesk 中使用评论更新票证。但是,问题是它需要格式化如下:
最后一封跟进电子邮件已发送给客户的票证 {{ticket.id}}。请致电客户并在票证上添加备注。
客户详情:
姓名:{{ticket.requester.name}}
电话:{{ticket.requester.phone}}谢谢
下面是我要发送的 Json。如果我添加一个简单的输入,那么我会收到错误。我相信对于使用过液体的人来说会很容易。
{
"ticket": {
"comment": {
"public": false,
"body": "The last follow up email has been sent to the customer for the ticket {{ticket.id}}. Please call the customer and add a note to the ticket. Customer details:Name: {{ticket.requester.name}}, Phone: {{ticket.requester.phone}} Thank you"
}
}
}
【问题讨论】:
-
我需要在“客户详细信息:”之后换行