[Issue #116] Fixing SBJSon decoding function
This commit is contained in:
parent
15057a86e1
commit
f28cf63a96
1 changed files with 3 additions and 1 deletions
|
|
@ -110,8 +110,10 @@ static id AFJSONDecode(NSData *data, NSError **error) {
|
|||
[invocation invoke];
|
||||
[invocation getReturnValue:&JSON];
|
||||
} else if (_SBJSONSelector && [data respondsToSelector:_SBJSONSelector]) {
|
||||
// Create a string representation of JSON, to use SBJSON -`JSONValue` category method
|
||||
NSString *string = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
|
||||
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[data methodSignatureForSelector:_SBJSONSelector]];
|
||||
invocation.target = data;
|
||||
invocation.target = string;
|
||||
invocation.selector = _SBJSONSelector;
|
||||
|
||||
[invocation invoke];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue