我有一个问题如何将 NSData 转换为 NSMultitableArray
我从 JSON 接收数据,我需要将该数据设置到 TableView 中。 如何做到这一点?
上面是JSON的例子:
{"d":"[{\"codUf\":28,\"descricao\":\"MG\"},{\"codUf\":29,\"descricao\":\"PR\"},{\"codUf\":19,\"descricao\":\"RJ\"},{\"codUf\":25,\"descricao\":\"SP\"}]"}
谢谢!
最佳答案
使用 SBJson https://github.com/stig/json-framework/
否则你可以做
NSError *error = nil;
[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]
关于ios - 如何将 NSData 转换为 NSMultitableArray,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16171887/