0
在我ifone應用程序,我已經調用的PHP頁面獲取內容,返回JSON格式,但響應包含像"
HTML實體。怎麼我這些實體轉換爲目標unicode.Any方法或庫C.HTML實體形成JSON
幫助是高度讚賞, 謝哈布。
在我ifone應用程序,我已經調用的PHP頁面獲取內容,返回JSON格式,但響應包含像"
HTML實體。怎麼我這些實體轉換爲目標unicode.Any方法或庫C.HTML實體形成JSON
幫助是高度讚賞, 謝哈布。
對於您的問題,您可以使用SBJSON類,並且將獲得由下面的代碼
NSString *stringResponse = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
SBJSON *jsonParser = [SBJSON new];
NSMutableDictionary *json = [jsonParser objectWithString:stringResponse error:NULL];
感謝烏爾立即響應導致字典JSON,我已經使用了相同的,但HTML實體是有 – vks
的NSString * json_string = [[NSString alloc] initWithData:響應編碼:NSUTF8StringEncoding]; \t \t \t NSDictionary * object = [parser objectWithString:json_string error:nil]; \t results = [parser objectWithString:json_string error:nil]; – vks