Skip to content

Commit

Permalink
Rename SBJSON to FBSBJSON in iOS SDK
Browse files Browse the repository at this point in the history
Summary: Rename SBJSON to FBSBJSON in iOS SDK; also updated references in sample Hackbook project

Test Plan:
After refactoring, verified sdk build with the ./scripts/build_distribution.sh script (though I don't have appledocs installed). Then verified Hackbook project builds and runs in simulator.

Let me know if there are other tests for the sdk.

Reviewers: jacl

Reviewed By: jacl

CC: mmarucheck, security-diffs@lists

Differential Revision: https://phabricator.fb.com/D565036

Task ID: 1431284
  • Loading branch information
chrisp-fb committed Sep 5, 2012
1 parent f777170 commit 0217ece
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 417 deletions.
28 changes: 0 additions & 28 deletions samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
Expand Up @@ -68,36 +68,22 @@
DD37EA9915ABA8A90015966B /* FacebookSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FacebookSDK.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FacebookSDK.h; sourceTree = "<group>"; }; DD37EA9915ABA8A90015966B /* FacebookSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FacebookSDK.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FacebookSDK.h; sourceTree = "<group>"; };
DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBCacheDescriptor.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBCacheDescriptor.h; sourceTree = "<group>"; }; DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBCacheDescriptor.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBCacheDescriptor.h; sourceTree = "<group>"; };
DD37EA9B15ABA8A90015966B /* FBConnect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBConnect.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBConnect.h; sourceTree = "<group>"; }; DD37EA9B15ABA8A90015966B /* FBConnect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBConnect.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBConnect.h; sourceTree = "<group>"; };
DD37EA9C15ABA8A90015966B /* FBDataDiskCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBDataDiskCache.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBDataDiskCache.h; sourceTree = "<group>"; };
DD37EA9D15ABA8A90015966B /* FBDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBDialog.h; sourceTree = "<group>"; }; DD37EA9D15ABA8A90015966B /* FBDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBDialog.h; sourceTree = "<group>"; };
DD37EA9E15ABA8A90015966B /* FBError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBError.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBError.h; sourceTree = "<group>"; }; DD37EA9E15ABA8A90015966B /* FBError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBError.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBError.h; sourceTree = "<group>"; };
DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFrictionlessRequestSettings.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFrictionlessRequestSettings.h; sourceTree = "<group>"; }; DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFrictionlessRequestSettings.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFrictionlessRequestSettings.h; sourceTree = "<group>"; };
DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFriendPickerViewController.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFriendPickerViewController.h; sourceTree = "<group>"; }; DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFriendPickerViewController.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFriendPickerViewController.h; sourceTree = "<group>"; };
DD37EAA115ABA8A90015966B /* FBGraphLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphLocation.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphLocation.h; sourceTree = "<group>"; }; DD37EAA115ABA8A90015966B /* FBGraphLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphLocation.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphLocation.h; sourceTree = "<group>"; };
DD37EAA215ABA8A90015966B /* FBGraphObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphObject.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObject.h; sourceTree = "<group>"; }; DD37EAA215ABA8A90015966B /* FBGraphObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphObject.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObject.h; sourceTree = "<group>"; };
DD37EAA315ABA8A90015966B /* FBGraphObjectTableDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphObjectTableDataSource.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObjectTableDataSource.h; sourceTree = "<group>"; };
DD37EAA415ABA8A90015966B /* FBGraphObjectTableSelection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphObjectTableSelection.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObjectTableSelection.h; sourceTree = "<group>"; };
DD37EAA515ABA8A90015966B /* FBGraphPlace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphPlace.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphPlace.h; sourceTree = "<group>"; }; DD37EAA515ABA8A90015966B /* FBGraphPlace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphPlace.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphPlace.h; sourceTree = "<group>"; };
DD37EAA615ABA8A90015966B /* FBGraphUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphUser.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphUser.h; sourceTree = "<group>"; }; DD37EAA615ABA8A90015966B /* FBGraphUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphUser.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphUser.h; sourceTree = "<group>"; };
DD37EAA715ABA8A90015966B /* FBLoginDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBLoginDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBLoginDialog.h; sourceTree = "<group>"; }; DD37EAA715ABA8A90015966B /* FBLoginDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBLoginDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBLoginDialog.h; sourceTree = "<group>"; };
DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBOpenGraphAction.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBOpenGraphAction.h; sourceTree = "<group>"; }; DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBOpenGraphAction.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBOpenGraphAction.h; sourceTree = "<group>"; };
DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBProfilePictureView.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBProfilePictureView.h; sourceTree = "<group>"; }; DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBProfilePictureView.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBProfilePictureView.h; sourceTree = "<group>"; };
DD37EAAA15ABA8A90015966B /* FBRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequest.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequest.h; sourceTree = "<group>"; }; DD37EAAA15ABA8A90015966B /* FBRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequest.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequest.h; sourceTree = "<group>"; };
DD37EAAB15ABA8A90015966B /* FBRequestBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequestBody.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequestBody.h; sourceTree = "<group>"; };
DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequestConnection.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequestConnection.h; sourceTree = "<group>"; }; DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequestConnection.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequestConnection.h; sourceTree = "<group>"; };
DD37EAAD15ABA8A90015966B /* FBSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSession.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSession.h; sourceTree = "<group>"; }; DD37EAAD15ABA8A90015966B /* FBSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSession.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSession.h; sourceTree = "<group>"; };
DD37EAAE15ABA8A90015966B /* FBSession+Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "FBSession+Internal.h"; path = "../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSession+Internal.h"; sourceTree = "<group>"; };
DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionManualTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionManualTokenCachingStrategy.h; sourceTree = "<group>"; }; DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionManualTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionManualTokenCachingStrategy.h; sourceTree = "<group>"; };
DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionTokenCachingStrategy.h; sourceTree = "<group>"; }; DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionTokenCachingStrategy.h; sourceTree = "<group>"; };
DD37EAB115ABA8A90015966B /* FBURLConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBURLConnection.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBURLConnection.h; sourceTree = "<group>"; };
DD37EAB215ABA8A90015966B /* FBUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBUtility.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBUtility.h; sourceTree = "<group>"; };
DD37EAB315ABA8A90015966B /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/JSON.h; sourceTree = "<group>"; };
DD37EAB415ABA8A90015966B /* NSObject+SBJSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSObject+SBJSON.h"; path = "../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/NSObject+SBJSON.h"; sourceTree = "<group>"; };
DD37EAB515ABA8A90015966B /* NSString+SBJSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSString+SBJSON.h"; path = "../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/NSString+SBJSON.h"; sourceTree = "<group>"; };
DD37EAB615ABA8A90015966B /* SBJSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBJSON.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/SBJSON.h; sourceTree = "<group>"; };
DD37EAB715ABA8A90015966B /* SBJsonBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBJsonBase.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/SBJsonBase.h; sourceTree = "<group>"; };
DD37EAB815ABA8A90015966B /* SBJsonParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBJsonParser.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/SBJsonParser.h; sourceTree = "<group>"; };
DD37EAB915ABA8A90015966B /* SBJsonWriter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBJsonWriter.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/SBJsonWriter.h; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */


/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -200,36 +186,22 @@
DD37EA9915ABA8A90015966B /* FacebookSDK.h */, DD37EA9915ABA8A90015966B /* FacebookSDK.h */,
DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */, DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */,
DD37EA9B15ABA8A90015966B /* FBConnect.h */, DD37EA9B15ABA8A90015966B /* FBConnect.h */,
DD37EA9C15ABA8A90015966B /* FBDataDiskCache.h */,
DD37EA9D15ABA8A90015966B /* FBDialog.h */, DD37EA9D15ABA8A90015966B /* FBDialog.h */,
DD37EA9E15ABA8A90015966B /* FBError.h */, DD37EA9E15ABA8A90015966B /* FBError.h */,
DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */, DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */,
DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */, DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */,
DD37EAA115ABA8A90015966B /* FBGraphLocation.h */, DD37EAA115ABA8A90015966B /* FBGraphLocation.h */,
DD37EAA215ABA8A90015966B /* FBGraphObject.h */, DD37EAA215ABA8A90015966B /* FBGraphObject.h */,
DD37EAA315ABA8A90015966B /* FBGraphObjectTableDataSource.h */,
DD37EAA415ABA8A90015966B /* FBGraphObjectTableSelection.h */,
DD37EAA515ABA8A90015966B /* FBGraphPlace.h */, DD37EAA515ABA8A90015966B /* FBGraphPlace.h */,
DD37EAA615ABA8A90015966B /* FBGraphUser.h */, DD37EAA615ABA8A90015966B /* FBGraphUser.h */,
DD37EAA715ABA8A90015966B /* FBLoginDialog.h */, DD37EAA715ABA8A90015966B /* FBLoginDialog.h */,
DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */, DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */,
DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */, DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */,
DD37EAAA15ABA8A90015966B /* FBRequest.h */, DD37EAAA15ABA8A90015966B /* FBRequest.h */,
DD37EAAB15ABA8A90015966B /* FBRequestBody.h */,
DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */, DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */,
DD37EAAD15ABA8A90015966B /* FBSession.h */, DD37EAAD15ABA8A90015966B /* FBSession.h */,
DD37EAAE15ABA8A90015966B /* FBSession+Internal.h */,
DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */, DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */,
DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */, DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */,
DD37EAB115ABA8A90015966B /* FBURLConnection.h */,
DD37EAB215ABA8A90015966B /* FBUtility.h */,
DD37EAB315ABA8A90015966B /* JSON.h */,
DD37EAB415ABA8A90015966B /* NSObject+SBJSON.h */,
DD37EAB515ABA8A90015966B /* NSString+SBJSON.h */,
DD37EAB615ABA8A90015966B /* SBJSON.h */,
DD37EAB715ABA8A90015966B /* SBJsonBase.h */,
DD37EAB815ABA8A90015966B /* SBJsonParser.h */,
DD37EAB915ABA8A90015966B /* SBJsonWriter.h */,
DD35C4BD15B9307600C0849B /* FBConnect.bundle */, DD35C4BD15B9307600C0849B /* FBConnect.bundle */,
); );
name = FBConnect; name = FBConnect;
Expand Down
6 changes: 3 additions & 3 deletions samples/Hackbook/Hackbook/APICallsViewController.m
Expand Up @@ -355,7 +355,7 @@ - (void)apiPromptExtendedPermissions {
*/ */
- (void)apiDialogFeedUser { - (void)apiDialogFeedUser {
currentAPICall = kDialogFeedUser; currentAPICall = kDialogFeedUser;
SBJSON *jsonWriter = [[SBJSON new] autorelease]; FBSBJSON *jsonWriter = [[FBSBJSON new] autorelease];


// The action links to be shown with the post in the feed // The action links to be shown with the post in the feed
NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys: NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
Expand Down Expand Up @@ -393,7 +393,7 @@ - (void)getFriendsCallAPIDialogFeed {
*/ */
- (void)apiDialogFeedFriend:(NSString *)friendID { - (void)apiDialogFeedFriend:(NSString *)friendID {
currentAPICall = kDialogFeedFriend; currentAPICall = kDialogFeedFriend;
SBJSON *jsonWriter = [[SBJSON new] autorelease]; FBSBJSON *jsonWriter = [[FBSBJSON new] autorelease];


NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys: NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Get Started",@"name",@"http://m.facebook.com/apps/hackbookios/",@"link", nil], nil]; @"Get Started",@"name",@"http://m.facebook.com/apps/hackbookios/",@"link", nil], nil];
Expand Down Expand Up @@ -427,7 +427,7 @@ - (void)apiDialogFeedFriend:(NSString *)friendID {
*/ */
- (void)apiDialogRequestsSendToMany { - (void)apiDialogRequestsSendToMany {
currentAPICall = kDialogRequestsSendToMany; currentAPICall = kDialogRequestsSendToMany;
SBJSON *jsonWriter = [[SBJSON new] autorelease]; FBSBJSON *jsonWriter = [[FBSBJSON new] autorelease];
NSDictionary *gift = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *gift = [NSDictionary dictionaryWithObjectsAndKeys:
@"5", @"social_karma", @"5", @"social_karma",
@"1", @"badge_of_awesomeness", @"1", @"badge_of_awesomeness",
Expand Down
2 changes: 1 addition & 1 deletion samples/Hackbook/Hackbook/APIResultsViewController.m
Expand Up @@ -123,7 +123,7 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
*/ */
- (void)apiGraphUserCheckins:(NSUInteger)index { - (void)apiGraphUserCheckins:(NSUInteger)index {
HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate]; HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
SBJSON *jsonWriter = [[SBJSON new] autorelease]; FBSBJSON *jsonWriter = [[FBSBJSON new] autorelease];


NSDictionary *coordinates = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *coordinates = [NSDictionary dictionaryWithObjectsAndKeys:
[[[myData objectAtIndex:index] objectForKey:@"location"] objectForKey:@"latitude"],@"latitude", [[[myData objectAtIndex:index] objectForKey:@"location"] objectForKey:@"latitude"],@"latitude",
Expand Down
2 changes: 1 addition & 1 deletion src/FBConnect.h
Expand Up @@ -19,4 +19,4 @@
#include "FBDialog.h" #include "FBDialog.h"
#include "FBLoginDialog.h" #include "FBLoginDialog.h"
#include "FBRequest.h" #include "FBRequest.h"
#include "SBJSON.h" #include "FBSBJSON.h"
4 changes: 2 additions & 2 deletions src/FBDialog.m
Expand Up @@ -16,9 +16,9 @@




#import "FBDialog.h" #import "FBDialog.h"
#import "FBSBJSON.h"
#import "Facebook.h" #import "Facebook.h"
#import "FBFrictionlessRequestSettings.h" #import "FBFrictionlessRequestSettings.h"
#import "JSON.h"
#import "FBUtility.h" #import "FBUtility.h"


/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -297,7 +297,7 @@ - (void)dialogSuccessHandleFrictionlessResponses:(NSURL *)url {
needle:@"frictionless_recipients="]; needle:@"frictionless_recipients="];
if (recipientJson) { if (recipientJson) {
// if value parses as an array, treat as set of fbids // if value parses as an array, treat as set of fbids
SBJsonParser *parser = [[[SBJsonParser alloc] FBSBJsonParser *parser = [[[FBSBJsonParser alloc]
init] init]
autorelease]; autorelease];
id recipients = [parser objectWithString:recipientJson]; id recipients = [parser objectWithString:recipientJson];
Expand Down
1 change: 0 additions & 1 deletion src/FBRequest.m
Expand Up @@ -15,7 +15,6 @@
*/ */


#import "Facebook.h" #import "Facebook.h"
#import "JSON.h"
#import "FBUtility.h" #import "FBUtility.h"
#import "FBSession+Internal.h" #import "FBSession+Internal.h"


Expand Down
6 changes: 3 additions & 3 deletions src/FBRequestConnection.m
Expand Up @@ -15,7 +15,7 @@
*/ */


#import <UIKit/UIImage.h> #import <UIKit/UIImage.h>
#import "JSON.h" #import "FBSBJSON.h"
#import "FBError.h" #import "FBError.h"
#import "FBURLConnection.h" #import "FBURLConnection.h"
#import "FBRequestBody.h" #import "FBRequestBody.h"
Expand Down Expand Up @@ -724,7 +724,7 @@ - (void)appendJSONRequests:(NSArray *)requests
attachments:attachments]; attachments:attachments];
} }


SBJSON *writer = [[SBJSON alloc] init]; FBSBJSON *writer = [[FBSBJSON alloc] init];
NSString *jsonBatch = [writer stringWithObject:batch]; NSString *jsonBatch = [writer stringWithObject:batch];
[writer release]; [writer release];
[batch release]; [batch release];
Expand Down Expand Up @@ -1068,7 +1068,7 @@ - (id)parseJSONOrOtherwise:(NSString *)utf8
{ {
id parsed = nil; id parsed = nil;
if (!(*error)) { if (!(*error)) {
SBJSON *parser = [[SBJSON alloc] init]; FBSBJSON *parser = [[FBSBJSON alloc] init];
parsed = [parser objectWithString:utf8 error:error]; parsed = [parser objectWithString:utf8 error:error];
// if we fail parse we attemp a reparse of a modified input to support results in the form "foo=bar", "true", etc. // if we fail parse we attemp a reparse of a modified input to support results in the form "foo=bar", "true", etc.
if (*error) { if (*error) {
Expand Down
4 changes: 2 additions & 2 deletions src/FBTestSession.m
Expand Up @@ -23,7 +23,7 @@
#import "FBSession+Internal.h" #import "FBSession+Internal.h"
#import "FBRequest.h" #import "FBRequest.h"
#import <pthread.h> #import <pthread.h>
#import "JSON.h" #import "FBSBJSON.h"
#import "FBGraphUser.h" #import "FBGraphUser.h"


/* /*
Expand Down Expand Up @@ -295,7 +295,7 @@ - (void)retrieveTestUsersForApp
userQuery, @"users", userQuery, @"users",
nil]; nil];


SBJSON *writer = [[SBJSON alloc] init]; FBSBJSON *writer = [[FBSBJSON alloc] init];
NSString *jsonMultiquery = [writer stringWithObject:multiquery]; NSString *jsonMultiquery = [writer stringWithObject:multiquery];
[writer release]; [writer release];


Expand Down
4 changes: 2 additions & 2 deletions src/Facebook.m
Expand Up @@ -20,7 +20,7 @@
#import "FBRequest.h" #import "FBRequest.h"
#import "FBError.h" #import "FBError.h"
#import "FBSessionManualTokenCachingStrategy.h" #import "FBSessionManualTokenCachingStrategy.h"
#import "JSON.h" #import "FBSBJSON.h"
#import "FBSession+Internal.h" #import "FBSession+Internal.h"
#import "FBUtility.h" #import "FBUtility.h"


Expand Down Expand Up @@ -695,7 +695,7 @@ - (void)dialog:(NSString *)action
id fbid = [params objectForKey:@"to"]; id fbid = [params objectForKey:@"to"];
if (fbid != nil) { if (fbid != nil) {
// if value parses as a json array expression get the list that way // if value parses as a json array expression get the list that way
SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease]; FBSBJsonParser *parser = [[[FBSBJsonParser alloc] init] autorelease];
id fbids = [parser objectWithString:fbid]; id fbids = [parser objectWithString:fbid];
if (![fbids isKindOfClass:[NSArray class]]) { if (![fbids isKindOfClass:[NSArray class]]) {
// otherwise seperate by commas (handles the singleton case too) // otherwise seperate by commas (handles the singleton case too)
Expand Down
10 changes: 5 additions & 5 deletions src/JSON/SBJSON.h → src/JSON/FBSBJSON.h
Expand Up @@ -28,19 +28,19 @@
*/ */


#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SBJsonParser.h" #import "FBSBJsonParser.h"
#import "SBJsonWriter.h" #import "FBSBJsonWriter.h"


/** /**
@brief Facade for SBJsonWriter/SBJsonParser. @brief Facade for SBJsonWriter/SBJsonParser.
Requests are forwarded to instances of SBJsonWriter and SBJsonParser. Requests are forwarded to instances of SBJsonWriter and SBJsonParser.
*/ */
@interface SBJSON : SBJsonBase <SBJsonParser, SBJsonWriter> { @interface FBSBJSON : FBSBJsonBase <FBSBJsonParser, FBSBJsonWriter> {


@private @private
SBJsonParser *jsonParser; FBSBJsonParser *jsonParser;
SBJsonWriter *jsonWriter; FBSBJsonWriter *jsonWriter;
} }




Expand Down
8 changes: 4 additions & 4 deletions src/JSON/SBJSON.m → src/JSON/FBSBJSON.m
Expand Up @@ -27,15 +27,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */


#import "SBJSON.h" #import "FBSBJSON.h"


@implementation SBJSON @implementation FBSBJSON


- (id)init { - (id)init {
self = [super init]; self = [super init];
if (self) { if (self) {
jsonWriter = [SBJsonWriter new]; jsonWriter = [FBSBJsonWriter new];
jsonParser = [SBJsonParser new]; jsonParser = [FBSBJsonParser new];
[self setMaxDepth:512]; [self setMaxDepth:512];


} }
Expand Down
2 changes: 1 addition & 1 deletion src/JSON/SBJsonBase.h → src/JSON/FBSBJsonBase.h
Expand Up @@ -52,7 +52,7 @@ enum {
This class contains the common error-handling code and option between the parser/writer. This class contains the common error-handling code and option between the parser/writer.
*/ */
@interface SBJsonBase : NSObject { @interface FBSBJsonBase : NSObject {
NSMutableArray *errorTrace; NSMutableArray *errorTrace;


@protected @protected
Expand Down
4 changes: 2 additions & 2 deletions src/JSON/SBJsonBase.m → src/JSON/FBSBJsonBase.m
Expand Up @@ -27,11 +27,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */


#import "SBJsonBase.h" #import "FBSBJsonBase.h"
NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain";




@implementation SBJsonBase @implementation FBSBJsonBase


@synthesize errorTrace; @synthesize errorTrace;
@synthesize maxDepth; @synthesize maxDepth;
Expand Down
8 changes: 4 additions & 4 deletions src/JSON/SBJsonParser.h → src/JSON/FBSBJsonParser.h
Expand Up @@ -28,14 +28,14 @@
*/ */


#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SBJsonBase.h" #import "FBSBJsonBase.h"


/** /**
@brief Options for the parser class. @brief Options for the parser class.
This exists so the SBJSON facade can implement the options in the parser without having to re-declare them. This exists so the SBJSON facade can implement the options in the parser without having to re-declare them.
*/ */
@protocol SBJsonParser @protocol FBSBJsonParser


/** /**
@brief Return the object represented by the given string. @brief Return the object represented by the given string.
Expand Down Expand Up @@ -71,7 +71,7 @@
as we can thus avoid any loss of precision. (JSON allows ridiculously large numbers.) as we can thus avoid any loss of precision. (JSON allows ridiculously large numbers.)
*/ */
@interface SBJsonParser : SBJsonBase <SBJsonParser> { @interface FBSBJsonParser : FBSBJsonBase <FBSBJsonParser> {


@private @private
const char *c; const char *c;
Expand All @@ -80,7 +80,7 @@
@end @end


// don't use - exists for backwards compatibility with 2.1.x only. Will be removed in 2.3. // don't use - exists for backwards compatibility with 2.1.x only. Will be removed in 2.3.
@interface SBJsonParser (Private) @interface FBSBJsonParser (Private)
- (id)fragmentWithString:(id)repr; - (id)fragmentWithString:(id)repr;
@end @end


Expand Down
6 changes: 3 additions & 3 deletions src/JSON/SBJsonParser.m → src/JSON/FBSBJsonParser.m
Expand Up @@ -27,9 +27,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */


#import "SBJsonParser.h" #import "FBSBJsonParser.h"


@interface SBJsonParser () @interface FBSBJsonParser ()


- (BOOL)scanValue:(NSObject **)o; - (BOOL)scanValue:(NSObject **)o;


Expand All @@ -54,7 +54,7 @@ - (BOOL)scanIsAtEnd;
#define skipDigits(c) while (isdigit(*c)) c++ #define skipDigits(c) while (isdigit(*c)) c++




@implementation SBJsonParser @implementation FBSBJsonParser


static char ctrl[0x22]; static char ctrl[0x22];


Expand Down
8 changes: 4 additions & 4 deletions src/JSON/SBJsonWriter.h → src/JSON/FBSBJsonWriter.h
Expand Up @@ -28,14 +28,14 @@
*/ */


#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SBJsonBase.h" #import "FBSBJsonBase.h"


/** /**
@brief Options for the writer class. @brief Options for the writer class.
This exists so the SBJSON facade can implement the options in the writer without having to re-declare them. This exists so the SBJSON facade can implement the options in the writer without having to re-declare them.
*/ */
@protocol SBJsonWriter @protocol FBSBJsonWriter


/** /**
@brief Whether we are generating human-readable (multiline) JSON. @brief Whether we are generating human-readable (multiline) JSON.
Expand Down Expand Up @@ -91,7 +91,7 @@
way you would expect. way you would expect.
*/ */
@interface SBJsonWriter : SBJsonBase <SBJsonWriter> { @interface FBSBJsonWriter : FBSBJsonBase <FBSBJsonWriter> {


@private @private
BOOL sortKeys, humanReadable; BOOL sortKeys, humanReadable;
Expand All @@ -100,7 +100,7 @@
@end @end


// don't use - exists for backwards compatibility. Will be removed in 2.3. // don't use - exists for backwards compatibility. Will be removed in 2.3.
@interface SBJsonWriter (Private) @interface FBSBJsonWriter (Private)
- (NSString*)stringWithFragment:(id)value; - (NSString*)stringWithFragment:(id)value;
@end @end


Expand Down

0 comments on commit 0217ece

Please sign in to comment.