将没有键的json数据解析为数组

时间:2015-12-23 09:44:35

标签: objective-c arrays json parsing

     NSString *responseData = [[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
            NSLog(@"Response ==> %@", responseData);

            SBJsonParser *jsonParser = [SBJsonParser new];
            NSDictionary *jsonData = (NSDictionary *) [jsonParser objectWithString:responseData error:nil];
            NSLog(@"%@",jsonData);
            NSInteger success = 1;
            NSLog(@"%d",success);




NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error];

                NSString *firstResult = jsonArray[0];

                NSLog(firstResult);
  

(           1971年,           "上承重",           T4,           2,           1,           "&#34 ;,           TU073MB4,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           554,           "&#34 ;,           ""       )           (           1972年,           "上承重",           T4,           2,           2,           "&#34 ;,           TU073MB4,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           "&#34 ;,           554,           "&#34 ;,           ""       ),

对于json而言,这是一个非常新的关键。我试图将json数据(上图)解析为xcode内的数组。但它仍然显示错误。任何帮助?感谢

0 个答案:

没有答案