解析 Coldfusion 9 在 Cocoa Obj-C 中生成的 JSON 响应
我有一个 NSDictionary 实例,通过
NSDictionary *responseDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
Coldfusion 生成的 JSON 响应创建,其输出类似于以下内容:
{"ROWCOUNT":1,"COLUMNS":["SUBSCRIBERID","FIRSTNAME","LASTNAME"],"DATA":{"SUBSCRIBERID":[
27775],"FIRSTNAME":["John"],"LASTNAME":["Doe"]}}
我想做的是枚举 DATA 对象,但在语法上遇到困难。
任何指导表示赞赏。
I have an NSDictionary instance created via
NSDictionary *responseDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
from a Coldfusion generated JSON response with a output similar to this:
{"ROWCOUNT":1,"COLUMNS":["SUBSCRIBERID","FIRSTNAME","LASTNAME"],"DATA":{"SUBSCRIBERID":[
27775],"FIRSTNAME":["John"],"LASTNAME":["Doe"]}}
What I'm trying to do is enumerate the DATA objects but struggling with the syntax.
Any guidance appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的“DATA”对象只是一个字典,所以这样做会枚举该字典:
Your "DATA" object is just a dict, so doing this would enumerate that dict: