Html entities form JSON
In my ifone App, i have called a php page to get contents, it returns JSON format,but the response contains Html entities like "
.How i convert these entities to unicode.Any methods or l开发者_高级运维ibraries in objective C.
help is highly appreciated, Shihab.
For your problem you can use SBJSON class and will get result in the dictionary json by following code
NSString *stringResponse = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
SBJSON *jsonParser = [SBJSON new];
NSMutableDictionary *json = [jsonParser objectWithString:stringResponse error:NULL];
精彩评论