开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜