I am new to ios development. i have a json that looks like
{"result":[]}
{"result":[{"alternative":[{"transcript":"free","confidence":0.63226712},{"transcript":"we"}],"final":true}],"result_index":0}
my coding part
- (BOOL)didReceiveVoiceResponse:(NSData *)data
{
// NSLog(@"data :%@",data);
// NSError *jsonError = nil;
////
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"responseString: %@",responseString);
NSData *data1 = [responseString dataUsingEncoding:NSUTF8StringEncoding];
NSLog(@"data1: %@",data1);
NSData *data2 = [responseString dataUsingEncoding:NSUTF8StringEncoding];
id json = [NSJSONSerialization JSONObjectWithData:data2 options:0 error:nil];
NSLog(@"====%@",json);
NSLog(@"%@",[json objectForKey:@"result"]);
console log
2016-05-06 09:55:34.909 SpeechToTextDemo[79631:2980023] responseString: {"result":[]}
{"result":[{"alternative":[{"transcript":"free","confidence":0.63226712},{"transcript":"we"}],"final":true}],"result_index":0}
2016-05-06 09:55:34.909 SpeechToTextDemo[79631:2980023] data1: <7b227265 73756c74 223a5b5d 7d0a7b22 72657375 6c74223a 5b7b2261 6c746572 6e617469 7665223a 5b7b2274 72616e73 63726970 74223a22 66726565 222c2263 6f6e6669 64656e63 65223a30 2e363332 32363731 327d2c7b 22747261 6e736372 69707422 3a227765 227d5d2c 2266696e 616c223a 74727565 7d5d2c22 72657375 6c745f69 6e646578 223a307d 0a>
2016-05-06 09:55:34.909 SpeechToTextDemo[79631:2980023] ====(null)
2016-05-06 09:55:34.910 SpeechToTextDemo[79631:2980023] (null)
kindly find my coding part and console log above. please guide me how to resolve this think. i want to tanscript
values. how to get this value. thanks