http://jsonlint.com/およびhttp://json.parser.online.fr/で有効な JSON をチェックしました。
しかし、私はそれを解析できず、このエラーに直面しています。
Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file while parsing object."
UserInfo={NSDebugDescription=Unexpected end of file while parsing object.}
私は AFNetworking 3.0 を使用しています。郵便配達員による私のコードと JSON 応答は次のとおりです。
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.requestSerializer setValue:apiKey forHTTPHeaderField:@"Authorization"];
[manager POST:urlString parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject){
[self.delegate requestFinished:responseObject];
}failure:^(NSURLSessionTask *operation, NSError *error) {
NSLog(@"%@",error);
[self.delegate requestFailed:[error localizedDescription]];
}];
ここで何が起こっているのか知っているかどうか教えてください。ありがとう