期望解码Dictionary <string,any =“”>但是找到了一个数组

时间:2018-01-10 12:47:52

标签: json swift dictionary codable

这是我的json:

[
  {
    "question": "What is the name of your favorite teacher?",
    "id": "Q1.1",
    "created_at": null,
  },
  {
    "question": "What is the name of your favorite singer?",
    "id": "Q1.2",
    "created_at": null,
  },
  {
    "question": "What is the name of your favorite teacher?",
    "id": "Q1.3",
    "created_at": null,
  }
]

如何使用Codable解析它?我的结构应该是什么?

0 个答案:

没有答案