diff --git a/AFNetworking/AFJSONRequestOperation.h b/AFNetworking/AFJSONRequestOperation.h index 738f71b..34acb4d 100644 --- a/AFNetworking/AFJSONRequestOperation.h +++ b/AFNetworking/AFJSONRequestOperation.h @@ -47,9 +47,9 @@ @property (readonly, nonatomic, strong) id responseJSON; /** - A bitmask of options that will be used by the NSJSONSerialization class that parses the JSON data from the response. + Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". */ -@property (readwrite) NSJSONReadingOptions parseOptions; +@property (nonatomic, assign) NSJSONReadingOptions JSONReadingOptions; ///---------------------------------- /// @name Creating Request Operations diff --git a/AFNetworking/AFJSONRequestOperation.m b/AFNetworking/AFJSONRequestOperation.m index c8def67..77ac8eb 100644 --- a/AFNetworking/AFJSONRequestOperation.m +++ b/AFNetworking/AFJSONRequestOperation.m @@ -38,6 +38,7 @@ static dispatch_queue_t json_request_operation_processing_queue() { @implementation AFJSONRequestOperation @synthesize responseJSON = _responseJSON; +@synthesize JSONReadingOptions = _JSONReadingOptions; @synthesize JSONError = _JSONError; + (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest @@ -66,7 +67,7 @@ static dispatch_queue_t json_request_operation_processing_queue() { if ([self.responseData length] == 0) { self.responseJSON = nil; } else { - self.responseJSON = [NSJSONSerialization JSONObjectWithData:self.responseData options:self.parseOptions error:&error]; + self.responseJSON = [NSJSONSerialization JSONObjectWithData:self.responseData options:self.JSONReadingOptions error:&error]; } self.JSONError = error;