Unexpected json result while calling the surveymonkey api

前端 未结 1 1181
夕颜
夕颜 2020-12-12 07:05

When calling the surveymonkey api I\'m using {\\\"survey_id\\\":\\\"47625442\\\",\" +\"\\\"fields[]\\\":\\\"[\'url\']\\\"}\" as the json data the server needs

1条回答
  •  不知归路
    2020-12-12 07:29

    As was pointed out in the comments: Your JSON formatting is off, so the API doesn't understand that you're asking for the URL.

    For an understanding of what's going on, take a look at the example request in the link you provided; note the format of the fields section.

    Try again, this time with:

    {"survey_id": "47625442", "fields": ["url"]}
    

    ...which with the escapes will look like this....

        {\"survey_id\": \"47625442\", \"fields\":[ \"url\" ]}"
    

    0 讨论(0)
提交回复
热议问题