我的WS返回简单的JSON这样的:如何从json保存在nsstring中获取一些值?
{
"thumbnail_url": "http://something.com/photos/003/582/test-tiny.jpg?1321956139",
"success": true,
"photo_url": "http://something.com/photos/003/582/test-medium.jpg?1321956139",
"big_photo_url": "http://something.com/photos/003/582/test-big.jpg?1321956139"
}
我得到这个NSData的从NSURLConnection的。我知道如何从NSData制作NSString。我想为“photo_url”键获得价值。
它如何做到这一点?
我会sugest [JSONkit(https://github.com/johnezang/JSONKit),因为它是那里的斋戒之物。这里是解析JSON的一些很好的信息:http://triplesoftware.nl/2011/08/json-parsing/ – rckoenes