誰でも MKNetworkKit を使用してサーバーからの JSON データを解析する例を示すことができますか?
私はNSMutableRequestを使用し、パラメーターをユーザー名とパスワードとして使用してそれを行いました。サードパーティのツールを使用するオプションを調べたいと思いました。
NSDictionary jsonDict = @{@"user":@{
@"password":txtPassword.text,
@"email":txtUsername.text}};
NSData jsonData = [NSJSONSerialization dataWithJSONObject:jsonDict
options:0 error:0];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable err)
{
NSString *dtaa = [[NSString alloc]initWithData:data encoding:NSASCIIStringEncoding];
NSLog(@"got response==%@", dtaa);
}];