Checking in work in progress on the library reorganization

This commit is contained in:
Blake Watters
2011-11-22 13:35:01 -05:00
parent ceb7eb478a
commit 5b718890ac
106 changed files with 6521 additions and 8036 deletions

View File

@@ -1,17 +0,0 @@
//
// RKJSONParserNXJSON.h
// RestKit
//
// Created by Evan Cordell on 7/26/11.
// Copyright 2011 Two Toasters. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "../../RKParser.h"
@interface RKJSONParserNXJSON : NSObject <RKParser> {
}
@end

View File

@@ -1,23 +0,0 @@
//
// RKJSONParserNXJSON.m
// RestKit
//
// Created by Evan Cordell on 7/26/11.
// Copyright 2011 Two Toasters. All rights reserved.
//
#import "RKJSONParserNXJSON.h"
#import "NXJsonParser.h"
#import "NXJsonSerializer.h"
@implementation RKJSONParserNXJSON
- (NSDictionary*)objectFromString:(NSString*)string error:(NSError**)error {
return [NXJsonParser parseString:string error:error ignoreNulls:YES];
}
- (NSString*)stringFromObject:(id)object error:(NSError**)error {
return [NXJsonSerializer serialize:object];
}
@end

View File

@@ -1,26 +0,0 @@
//
// RKJSONParserSBJSON.h
// RestKit
//
// Created by Blake Watters on 5/14/11.
// Copyright 2011 Two Toasters
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "../../RKParser.h"
@interface RKJSONParserSBJSON : NSObject <RKParser> {
}
@end

View File

@@ -1,48 +0,0 @@
//
// RKJSONParserSBJSON.m
// RestKit
//
// Created by Blake Watters on 3/4/10.
// Copyright 2010 Two Toasters
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "RKJSONParserSBJSON.h"
#import "SBJsonParser.h"
#import "SBJsonWriter.h"
@implementation RKJSONParserSBJSON
- (NSDictionary*)objectFromString:(NSString*)string error:(NSError **)error {
SBJsonParser* parser = [[SBJsonParser alloc] init];
id result = [parser objectWithString:string];
if (nil == result) {
if (error) *error = [[parser errorTrace] lastObject];
}
[parser release];
return result;
}
- (NSString*)stringFromObject:(id)object error:(NSError **)error {
SBJsonWriter *jsonWriter = [SBJsonWriter new];
NSString *json = [jsonWriter stringWithObject:object];
if (!json) {
if (error) *error = [[jsonWriter errorTrace] lastObject];
}
[jsonWriter release];
return json;
}
@end

View File

@@ -1,26 +0,0 @@
//
// RKJSONParserYAJL.h
// RestKit
//
// Created by Blake Watters on 5/14/11.
// Copyright 2011 Two Toasters
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "../../RKParser.h"
@interface RKJSONParserYAJL : NSObject <RKParser> {
}
@end

View File

@@ -1,34 +0,0 @@
//
// RKMappingFormatJSONParserYAJL.m
// RestKit
//
// Created by Blake Watters on 9/28/10.
// Copyright 2010 Two Toasters
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "RKJSONParserYAJL.h"
#import "YAJL.h"
@implementation RKJSONParserYAJL
- (NSDictionary*)objectFromString:(NSString*)string error:(NSError **)error {
return [string yajl_JSON:error];
}
- (NSString*)stringFromObject:(id)object error:(NSError **)error {
return [object yajl_JSONStringWithOptions:YAJLGenOptionsIncludeUnsupportedTypes indentString:@" "];
}
@end