Postman “SyntaxError: Unexpected token < in JSON at position 1“

created at 06-26-2022 views: 39

The problem is reproduced:

tool: postman

Request method: post

Request parameter: an array type parameter, such as testList, raw->jason, when passing parameters as follows

{
    "testList" : "test001"
}

Click to send the request and report an error: "SyntaxError: Unexpected token < in JSON at position 1"

Reason: bug in Postman request

solution

When passing parameters, raw->jason

{
    "testList" : ["test001"]
}

or

body->x-www-form-urlencoded
key: testList[0]
value: test001
created at:06-26-2022
edited at: 06-26-2022: