开发者

iPhone JSON Retreving Value

开发者 https://www.devze.com 2023-02-28 21:10 出处:网络
Hi I am passing one api and getting the response from the server [{\\\"Latitude\\\":\\\"34\\\",\\\"Longitude\\\":\\\"45\\\"},{\\\"Latitude\\\":\\\"46\\\",\\\"Longitude\\\":\\\"45\\\"},{\\\"Latitude\

Hi I am passing one api and getting the response from the server

[{\"Latitude\":\"34\",\"Longitude\":\"45\"},{\"Latitude\":\"46\",\"Longitude\":\"45\"},{\"Latitude\":\"73\",\"Longi开发者_StackOverflowtude\":\"54\"}]

however i didn't know how to break the response which i have got from server into array, so that i can store the values and used it..


It's standard JSON. Lots of libraries out there that do exactly that. I would recommend SBJSON.

http://code.google.com/p/json-framework/


to expend on MarPowell answer - this is JSON check out the JSON website - http://www.json.org/

also if you wants to parse it in iPhone sdk check out this great tutorial - http://mobile.tutsplus.com/tutorials/iphone/iphone-json-twitter-api/

0

精彩评论

暂无评论...
验证码 换一张
取 消