mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-01 06:02:26 +08:00
Overhaul RKParser API's for clarity and simplicity:
* Adds support for NSJSONSerialization. closes #476 * Renames RKParser to RKSerialization * Renames RKParserRegistry to RKMIMETypeSerialization * Rework serialization implementations API's to use class methods * Fold together string and regular expression matching for MIME Type registrations * Port serialization implementations to working off of NSData instead of NSString. refs #762 * Migrate JSONKit to being an optional component. See https://github.com/RestKit/RKJSONKitSerialization
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#import "RKManagedObjectMappingOperationDataSource.h"
|
||||
#import "RKInMemoryManagedObjectCache.h"
|
||||
#import "NSString+RKAdditions.h"
|
||||
#import "RKParserRegistry.h"
|
||||
#import "RKMIMETypeSerialization.h"
|
||||
#import "RKLog.h"
|
||||
|
||||
// Set Logging Component
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
|
||||
NSString *MIMEType = [path MIMETypeForPathExtension];
|
||||
id parsedData = [[RKParserRegistry sharedRegistry] parseData:payload withMIMEType:MIMEType error:&localError];
|
||||
id parsedData = [RKMIMETypeSerialization objectFromData:payload MIMEType:MIMEType error:&localError];
|
||||
if (!parsedData) {
|
||||
RKLogError(@"Failed to parse file at path '%@': %@", path, [localError localizedDescription]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user