iphone - JSON parsing issues -


i getting json can't seem parse it. code:

[httpclient postpath:@"" parameters:parameters success:^(afhttprequestoperation *operation, id responseobject) {     nsdictionary *jsondict = [nsjsonserialization jsonobjectwithdata:responseobject options:kniloptions error:nil];     nslog(@"%@",jsondict);      nsarray *jsonarray = [jsondict objectforkey:@"sjson"];     nslog(@"%@",[jsonarray class]);     nslog(@"%@",jsonarray); 

the nslog prints class gives me _nscfstring class.

could it not json? although looks json. looks this:

[{"imagetagid":78,"xpixel":408,"ypixel":69,"xpercent":17}]

looks have json embedded in json:

{ "sjson": "[{\"imagetagid\":78,\"xpixel\":408,\"ypixel\":69,\"xpercent\":17}]" } 

you'll have decode "jsonarray" (which string) again using nsjsonserialization then.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -