mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-01 22:42:51 +08:00
* 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
24 lines
517 B
Objective-C
24 lines
517 B
Objective-C
//
|
|
// RKNSJSONSerialization.m
|
|
// RestKit
|
|
//
|
|
// Created by Blake Watters on 8/31/12.
|
|
// Copyright (c) 2012 RestKit. All rights reserved.
|
|
//
|
|
|
|
#import "RKNSJSONSerialization.h"
|
|
|
|
@implementation RKNSJSONSerialization
|
|
|
|
+ (id)objectFromData:(NSData *)data error:(NSError **)error
|
|
{
|
|
return [NSJSONSerialization JSONObjectWithData:data options:0 error:error];
|
|
}
|
|
|
|
+ (NSData *)dataFromObject:(id)object error:(NSError **)error
|
|
{
|
|
return [NSJSONSerialization dataWithJSONObject:object options:0 error:error];
|
|
}
|
|
|
|
@end
|