Post Man中无效的JSON Post Payload

时间:2018-03-14 00:00:34

标签: json http postman

为什么这不是Post Man中的有效raw JSON (application/json) POST有效负载?

{
    [
        {
            "keyOne": "valueOne",
            "keyTwo": "valueTwo"
        }
    ]
}

1 个答案:

答案 0 :(得分:1)

您的外括号表示它是一个对象,但外部对象没有键。它看起来应该更像:

here is an example code.

```
// this area is nested 3-backticks code block.
const hello = "hello";
```

或者,如果你想要一个阵列,你就不需要外括号:

{
    "array_name": [ {
        "keyOne": "valueOne",
        "keyTwo": "valueTwo"
    }]
}