快速解析/解码多维json数组

时间:2018-10-18 21:06:02

标签: json swift multidimensional-array decode

任何机构都可以帮助我快速解码多维json数组。

json:

{
  "0": { "key":"value","key2":"value2","key3":"value3" },
  "1": {"key":"value","key2":"value2","key3":"value3"},
  "2": {"key":"value","key2":"value2","key3":"value3"}
}

1 个答案:

答案 0 :(得分:1)

您可以尝试

let res = try? JSONDecoder().decode([String:[String:String]].self,from:jsonData)