iphone - I send some data to a webservice, it returns some JSON as NSData. How to convert to Dict?(iOS 4.3) -


i send credentials web-service.

i can responce nsdata or nsstring.

whats simpleist way convert (nsdata or nsstring)json nsdictionary can process it?

building ios4.3 many thanks, -code

download sbjsonparser framework using link, http://github.com/stig/json-framework/downloads , add required classes project (sbjsonparser.h).

import sbjsonparser.h , use following code,

    sbjsonparser *parser = [[sbjsonparser alloc] init];       //dictionary name,id      nsdictionary *jsonobject = [parser objectwithstring:jsonstring error:null];         //name array                       nsmutablearray *namearray = [[nsmutablearray alloc]init];    (nsmutabledictionary *dic in jsonobject){        [namearray addobject:[dic valueforkey:@"name"]];     } 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -