开发中从后台请求数据,返回如下:
2014-12-05 16:44:52.535 掌麦[6984:613] getDefaultAddress: reuslt == {
item = {
data = {
address = "<null>";
area = "<null>";
city = "<null>";
name = "";
phone = 18503051318;
province = "<null>";
};
mark = 1;
msg = "\U6210\U529f";
};
status = 1;
}
我直接解析出字典dic,赋值:
原因及时后台返回有些值为null,在object-c中就是nsull的空值
所以解析后,应加一判断,防止出错
这样就OK了
转载:http://blog.csdn.net/feixiang_song/article/details/41749679