邮递员:从邮递员 POST 请求接收语法错误

时间:2021-02-21 10:02:41

标签: json post postman

{
    "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 响应。

任何帮助将不胜感激。

enter image description here

更新:

当我通过 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

之后没有发布任何内容

这是错误在 Charles 中的显示方式

enter image description here

0 个答案:

没有答案