json - 邮递员:从邮递员 POST 请求中接收语法错误
问题描述
{
"order": {
"operationTimes": {
"start": "",
"end": ""
},
"forCustomer": "87778",
"type": "8787",
"stand": "",
"plannedStartAt": "",
"begin": {
"number": "9445",
"destination": "8787",
"suffix": "",
"originDate": "21\/02\/2021",
"isNew": true,
"origin": "989898",
"existingId": "",
"company": "98998"
},
"private": false,
"loc": "",
"types": "test",
"date": "21\/02\/2021",
"transactionType": "",
"testSupplier": "88881d335b647351068b0000",
"cust": "343434"
},
"forNew": false
}
但是,当我在 Postman 中将其作为原始内容发布时,我收到以下语法错误:
Failed to parse data (org.json.JSONException: Expected a ',' or '}' at 650 [character 45 line 26]
这指向这testSupplier
条线,但我看不到我在这里遗漏了什么。我不想}
在此时关闭对象,因为我有更多属性是order
对象的一部分。我已经有一个,
. 显然,这个错误阻止了全文发布,因此我收到了 400 响应。
任何帮助将不胜感激。
更新:
当我通过 Charles 代理检查呼叫时,这是实际发布在正文中的内容:
{
"fuelOrder": {
"operationTimes": {
"onBlocksAtScheduled": "",
"offBlocksAtScheduled": ""
},
"forCustomer": "3255",
"fuelType": "23523",
"stand": "",
"plannedStartAt": "",
"outbound": {
"number": "9445",
"destination": "235235",
"suffix": "",
"originDate": "21\/02\/2021",
"isNew": true,
"origin": "235235",
"existingId": "",
"airline": "52323523"
},
"privateFlight": false,
"terminal": "",
"type": "ref",
"date": "21\/02\/2021",
"transactionType": "",
"fuelSupplier": "23523"
所以它之后没有发布任何东西fuelSupplier
这就是错误在查尔斯中的显示方式
解决方案
推荐阅读
- angular - Strapi 在服务器中发布后删除数据库
- html - html css堆栈顺序错误
- c++ - 即使 SublimeAstyleformatter 的 autoformat_on_save 为 true,在 Sublime 中保存后文件也不会格式化
- javascript - 有没有办法在 Javascript 环境中为 Electron 应用程序创建自动 selenium-webdriver?
- php - 当我在表中搜索某些内容时,我需要刷新或再次加载表
- camera - 具有窄景深的相机校准
- mongodb - TypeError:参数必须是 Writer.writeBuffer 处的缓冲区
- reactjs - 用法
交叉口观察者的反应 - elasticsearch - 转移前在同一节点上创建的副本
- spartacus-storefront - 扩展 StoreFrontComponent (cx-storefront)