mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-17 04:25:56 +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:
@@ -1,3 +1,9 @@
|
||||
2010-09-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSDictionary+BSJSONAdditions.m
|
||||
(+[NSMutableDictionary dictionaryWithJSONString:]): return nil
|
||||
directly if the json string is empty.
|
||||
|
||||
2010-09-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m (-_appendSystemMailAccount): cleaned
|
||||
|
||||
@@ -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