Skip to content

Commit

Permalink
Merge pull request #18 from baztokyo/hotfix-1.1.4
Browse files Browse the repository at this point in the history
Fix Json macro
  • Loading branch information
baztokyo committed Jun 28, 2013
2 parents 9faf554 + 981a195 commit 7cc1a27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions BZFoursquare/BZFoursquareRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#import <MobileCoreServices/MobileCoreServices.h>
#import "BZFoursquareRequest.h"
#if defined(BZ_USE_JSONKIT)
#if BZ_USE_JSONKIT
#import "JSONKit.h"
#elif defined(BZ_USE_SBJSON)
#elif BZ_USE_SBJSON
#import "SBJson.h"
#endif

Expand Down Expand Up @@ -166,10 +166,10 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
if ([NSJSONSerialization class]) {
response = [NSJSONSerialization JSONObjectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&error];
} else {
#if defined(BZ_USE_JSONKIT)
#if BZ_USE_JSONKIT
JSONDecoder *decoder = [JSONDecoder decoder];
response = [decoder objectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] error:&error];
#elif defined(BZ_USE_SBJSON)
#elif BZ_USE_SBJSON
SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease];
response = [parser objectWithString:responseString];
if (!response) {
Expand All @@ -181,10 +181,10 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
#endif
}
#else
#if defined(BZ_USE_JSONKIT)
#if BZ_USE_JSONKIT
JSONDecoder *decoder = [JSONDecoder decoder];
response = [decoder objectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] error:&error];
#elif defined(BZ_USE_SBJSON)
#elif BZ_USE_SBJSON
SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease];
response = [parser objectWithString:responseString];
if (!response) {
Expand Down

0 comments on commit 7cc1a27

Please sign in to comment.