cloud - 音调分析器教程获取 "code":400,"sub_code":"C00012","error":"Invalid JSON input at line 1, column 2"
问题描述
我正在尝试建议的 json 数据,{"text": "Team, I know that times are tough! Product sales have been disappointing for the past three quarters. We have a competitive product, but we need to do a better job of selling it!"}
但没有成功。请指教。
解决方案
API 文档中有错误。该服务需要不同的 json 格式,如下所示:
{
"utterances": [
{
"text": "Hello, I'm having a problem with your product.",
"user": "customer"
},
{
"text": "OK, let me know what's going on, please.",
"user": "agent"
},
{
"text": "Well, nothing is working :(",
"user": "customer"
},
{
"text": "Sorry to hear that.",
"user": "agent"
}
]
}
请参阅指定 JSON 输入
推荐阅读
- asp.net - 启动项目 ASP.NET Core 3.1 后在运行时添加程序集控制器和视图
- reactjs - 使用 Async/Await 获取数据时遇到问题
- python - 使用 discord.py 识别并保存特定频道中的 Spotify 链接
- static-site - 十一:在站点地图的永久链接中生成每个类别
- python - 如何从熊猫数据框中的现有列创建新列
- javascript - 页面加载VUE时的onload方法
- php - 为什么我在 Laravel 中收到此错误?错误:-函数 Darryldecode\Cart\Cart::updateQuantityRelative() 的参数太少
- api - 获取授权码流的 Oauth 2.0 令牌
- java - if 语句中的 Java 数组未按预期工作
- react-bootstrap - 使 FontAwesomeIcon 在按钮中居中