json - 在尝试发送 Body 进行活动时,我被告知 JSON 解析不正确
问题描述
我目前正在尝试设置营销活动,但在尝试将原始文本发布到相关 API 时遇到问题。请在通过邮递员将其提交到相关端点时获得一些语法建议吗?
我已通过 JSON 验证器发送此消息,建议“第 1 行解析错误:{ % capture SKU_6d %}
期待 'STRING', '}', got 'undefined'" 即使它看起来像是填写给我的。由于格式化程序会建议我无法理解的问题,请我对此提出建议。
如下:
{
% capture SKU_6d %
}{
{
"event_properties.$"{
"product_code"x
}
}
}{
"% endcapture %"
}{
% capture SKU_4d %
}{
{
"event_properties.$"{
"product_code"
}
}"| slice": 0,
4
}
}{
"% endcapture %"
}{
{
"content_blocks.$"{
"Replenishment_SKUs"
}
}
}{
"% if"{
{
"rep"
}
}"!= blank %"
}{
"% assign rep_s ="{
{
"rep | times": 86400 %
}{
"% assign rep_date =""now""| date": "%s""| plus": {
{
"rep_s"
}
}"%"
}{
"% assign rep_date_ISO ="{
{
"rep_date"
}
}"| date": "%F""%"
}{
"attributes": [
{
"braze_id": "{{${braze_id}}}",
"replenishment_{{SKU_4d}}_date": "{{rep_date_ISO}}",
"replenishment_{{SKU_4d}}_SKU": "{{SKU_6d}}"
}
]
}{
"% else %"
}{
"% abort_message() %"
}{
"% endif %"
}```
Thanks
解决方案
推荐阅读
- sql - SQL 返回列中值发生变化的记录
- java - 如何从空手道中的 url 读取 xlsx 下载的内容
- azure - 通过命令输出在 Jenkins 中设置环境变量
- ansible - 在特定列插入字符串 - Jinja2
- python - 创建一个新层
- scala - Scala Akka SBT 错误“在构建文件中设置当前项目”
- javascript - 我正在尝试将值从 HTML 输入传递到 JavaScript 函数,然后传递到顶点控制器以在 salesforce 中创建潜在客户
- bash - 如何在基于 MacOS 的 Github Action 运行器中设置 Bash 4 和其他 GNU 工具?
- javascript - 如何从 Javascript 数组中删除上传的文件?
- forms - Jet Engine Checkbox 元数据未显示在前端添加帖子表单中