objective c - parsing json in iphone -


I've got a Twitter Jason Feed. Error getting parsing JS JSN feed Json url.i using Jsonkit.below, wants to parse the value text and profile_baband_mate_url in the JSN feed cube below and people help me

  [["created_at": "Som July 09 21:46:49 +0000 2012 "," id ": 222446736654872580," ID_STR ":" 222446736654872576 "," text ":": http://t.co/pPGYijEX "," source ":" web " You have to go @mevru, "url", "user": {"id", "url", "INREU", "youtube", "INREU", "youtube", "INRU" ": 145125358," ID_STR Well actor ... ":" 145125358 "," name ":" Ami Ab B "," SCREEN_NAME ":" SrBachchan "," Location ":" Mumbai, India "," description "," would at least say something still !! "," Url ":" http://srbachchan.tumblr.com "," protected ": incorrect," follower people ": 3022511," FRIENDS_COUNT ": 415," listed_count ": 22016," created_at ":" Tuesday May True, "statuses_count": 14,166, "validated": false "verified": "185:16:47 +00000", "favourites_count": 10, "utc_offset": 19800, "TIME_ZONE": "Mumbai", "geo_enabled" "Lang": "n", "contributors_enabled": false, "is_translator": false, "profile_background_color": "BADFCD" "profile_background_image_url": "http://a0.twimg.com/profile_background_images/144221357/t-1. Gif "," profile_background_image_url_https ":" https://si0.twimg.com/profile_background_images/144221357/t-1.gif "," profile_background_tile ": True," profile_image_url ":" http://a0.twimg.com /profile_images/2227330575/Amitji_normal.png "," profile_image_url_https ":" https://si0.twimg.com/profile_images/2227330575/ literally, "show_all_in Line_media ":" FFF7 7 "," Profile_sidebar_fil_color ":" FFF7 7 "," FFF 7CCC "," Profile_textcolor ":" 0C3E53 "," Profile_UG-background_image ": True, Default Profile Wrong: "default_profile_image": incorrect, "following": blank, "follow_request_sent": null, "notifications": null}   

The following is the iOS code that I used to parse Done

 jsonurl = [NSURL URLWithString: @ "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=@SrBachchan&count=10"]; Json data = [[NSString alloc] initWithContentsOfURL: jsonurl]; JsonArray = [JSanTata ObjectFruzsstringer]; Items = [Jasonrey ObjectForky: @ "text"]; NSLog (@ "Text given:% @", item); Story = [NSMutableArray array]; Title = [NSMutableArray array]; Picture = [nsmutab and other array]; (In the items in the DesiDeens * item) {}    

The problem is in this line:

  items = [Jason Array ObjectForcae: @ "text"];   

As your code suggests, it is not an array, so in this way you grab the object with the first array:

  (NSDictionary * item in jsonArray) {NSDictionary * User = [Object objectForKey: @ "user"]; NSString * imageURLString = [User ObjectForekey: @ "profile_image_URL"]; }    

Comments