JSON iPhone - 帮助
我可以从 Web 服务获取以下 JSON 数据。
问题:
- 返回的 JSON 格式是否正确?
- 我不知道如何在 xcode 上取回这些数据?
有人可以帮我吗?
多谢。
http://192.168.11.6/specicRegion.php?region_ID=011
[{"idReference_no":"R00008","Region_ID":"011","HouseMall_Name_In_Chinese":"A","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00009","Region_ID":"011","HouseMall_Name_In_Chinese":"B","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00010","Region_ID":"011","HouseMall_Name_In_Chinese":"C","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00011","Region_ID":"011","HouseMall_Name_In_Chinese":"D","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}]
I can get the following JSON data back from the web services.
Questions:
- Is the correct format for JSON that should return?
- I have no idea to get back those data on xcode?
Anyone could give me hand?
Thanks a lot.
http://192.168.11.6/specificRegion.php?region_ID=011
[{"idReference_no":"R00008","Region_ID":"011","HouseMall_Name_In_Chinese":"A","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00009","Region_ID":"011","HouseMall_Name_In_Chinese":"B","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00010","Region_ID":"011","HouseMall_Name_In_Chinese":"C","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00011","Region_ID":"011","HouseMall_Name_In_Chinese":"D","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于第一个问题:您始终可以在 jsonlint.com 上检查 json 对象的有效性。如果您是 Chrome 用户,还可以查看 JSONView Chrome 扩展程序。有关在 xcode 项目中使用 JSON 的信息,请参阅 这个问题。
For the first question: you can always check for the validity of a json object at jsonlint.com. Also check out the JSONView chrome extension if you're a chrome user. For using JSON in xcode projects, refer this question.