在HTTP post请求中,如何在URL查询中传递具有多个Object的JSON数组

时间:2017-11-17 00:38:34

标签: arrays json http post query-parameters

我需要在URL查询参数中发布一个在后端有对象的JSON数组。

以下是示例数组:

[
    {
        "question": "What is the name of your favorite childhood friend?",
        "answer": "1"
    },
    {
        "question": "What is the name of your pet?",
        "answer": "1"
    },
    {
        "question": "Who is your favorite musican?",
        "answer": "1"
    }
]

它与body参数一起正常工作,但我必须发送一个URL查询。有人可以帮忙吗?