Files
RestKit/Code/Support/RKNSJSONSerialization.m
Blake Watters 10377d0a70 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
2012-09-04 13:07:31 -04:00

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