如何处理json中的空值?
我在我的项目中使用 JSON,并从 JSON 获取此数据:
{ "email" : null,
"fax" : null,
"upload" : [
{ "ID" : "80693",
"username" : "khatridha123",
"name" : "s_raju.jpg",
"size" : "42644",
"extention" : ".jpg",
"insertMethod" : "upload",
"insertInfo" : "NULL",
"created" : "2011-09-20 06:34:10",
"lastUpdate" : "2011-10-18 00:30:27"
}
]
}
如何将此数据解析为表视图并检查上传字段是否包含记录?
I am using JSON in my project and am getting this data from JSON:
{ "email" : null,
"fax" : null,
"upload" : [
{ "ID" : "80693",
"username" : "khatridha123",
"name" : "s_raju.jpg",
"size" : "42644",
"extention" : ".jpg",
"insertMethod" : "upload",
"insertInfo" : "NULL",
"created" : "2011-09-20 06:34:10",
"lastUpdate" : "2011-10-18 00:30:27"
}
]
}
How can I parse this data into tableview and check if the upload field contains records or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在字典或数组的帮助下检查它。当您完成提取将存储在字典中的数据并在 forkeyvalue 的帮助下,您可以获得标签值,然后可以将其存储在字符串中,然后检查字符串值是否为零
you can check it with the help of the dictionary or array.. when you complete the fetching of the data that will store in a dictionary and with the help of the forkeyvalue you can get the tag value and you can store it in string and than check the string value is nil like