【问题标题】:How to format an in chrome Postman app?如何格式化 chrome Postman 应用程序?
【发布时间】:2017-05-18 11:27:38
【问题描述】:

我收到了一个名为 questionList 的参数。 格式是这样的:-

'questionList' = [{"qid":"1","ans":"798789","qst_type":"text_area"},
 {"qid":"2","ans":"1","qst_type":"radio"},
 {"qid":"3","ans":"3","qst_type":"radio"},
 {"qid":"4","ans":"789789","qst_type":"text_area"},
 {"qid":"5","ans":"like","qst_type":"like_dislike"},
 {"qid":"6","ans":4,"qst_type":"rating"},
 {"qid":"7","ans":"2","qst_type":"smiley"}]

如何将结果解析为数组?

【问题讨论】:

    标签: php arrays postman


    【解决方案1】:

    您正在接收JSON 格式的字符串。使用json_decode($string, [$useAssoc]) 使其返回 PHP 数组。

    Example code

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-23
      • 1970-01-01
      • 2016-04-14
      • 2014-11-09
      • 2017-08-03
      • 2015-08-15
      • 2015-08-05
      相关资源
      最近更新 更多