mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-05 02:19:43 +00:00
Monotone-Parent: dc071254a9d11e448e52ad014d8f4d5c92d5e2e0
Monotone-Revision: bdd1da3bc411d49caed330f6c4789f0d801296db Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-30T17:36:37 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -191,12 +191,20 @@ const int jsonDoNotIndent = -1;
|
||||
|
||||
@implementation NSMutableDictionary (BSJSONAdditions)
|
||||
|
||||
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString
|
||||
+ (NSMutableDictionary *) dictionaryWithJSONString: (NSString *) jsonString
|
||||
{
|
||||
NSScanner *scanner = [[NSScanner alloc] initWithString:jsonString];
|
||||
NSMutableDictionary *dictionary = nil;
|
||||
[scanner scanJSONObject:&dictionary];
|
||||
[scanner release];
|
||||
NSScanner *scanner;
|
||||
NSMutableDictionary *dictionary;
|
||||
|
||||
dictionary = nil;
|
||||
|
||||
if ([jsonString length] > 0)
|
||||
{
|
||||
scanner = [[NSScanner alloc] initWithString: jsonString];
|
||||
[scanner scanJSONObject:&dictionary];
|
||||
[scanner autorelease];
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user