Skip to content

Commit

Permalink
Merge pull request #17 from gooichi/hotfix-1.1.3
Browse files Browse the repository at this point in the history
Remove SBJson deprecated methods
  • Loading branch information
baztokyo committed Jun 26, 2013
2 parents c309b59 + ac178e2 commit 9faf554
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions BZFoursquare/BZFoursquareRequest.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011-2012 Ba-Z Communication Inc. All rights reserved.
* Copyright (C) 2011-2013 Ba-Z Communication Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -171,7 +171,11 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
response = [decoder objectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] error:&error];
#elif defined(BZ_USE_SBJSON)
SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease];
response = [parser objectWithString:responseString error:&error];
response = [parser objectWithString:responseString];
if (!response) {
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:parser.error forKey:NSLocalizedDescriptionKey];
error = [NSError errorWithDomain:@"org.brautaset.SBJsonParser.ErrorDomain" code:0 userInfo:userInfo];
}
#else
#error BZ_USE_* must be defined
#endif
Expand All @@ -182,7 +186,11 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
response = [decoder objectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] error:&error];
#elif defined(BZ_USE_SBJSON)
SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease];
response = [parser objectWithString:responseString error:&error];
response = [parser objectWithString:responseString];
if (!response) {
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:parser.error forKey:NSLocalizedDescriptionKey];
error = [NSError errorWithDomain:@"org.brautaset.SBJsonParser.ErrorDomain" code:0 userInfo:userInfo];
}
#else
#error BZ_USE_* must be defined
#endif
Expand Down

0 comments on commit 9faf554

Please sign in to comment.