mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Monotone-Parent: a1ad485763dbb256f42488a0cf3e8c8061604d83
Monotone-Revision: d656a1a3c9e97c1b1a23a7959821aa3c54780d86 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-18T23:15:34 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2009-11-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSDictionary+BSJSONAdditions.m
|
||||
(+dictionaryWithJSONString:): this constructor now explicitly
|
||||
returns an NSMutableDictionary to avoid messing with mutable
|
||||
copies and useless allocation/deallocation in the callers.
|
||||
|
||||
* Main/SOGo.m (+initialize): removed the "debugObjectAllocation" global
|
||||
variable since "debugLeaks" has the same meaning. Instantiate a
|
||||
"SOGoStartupLogger" object in order to avoid using NSLog when the
|
||||
|
||||
@@ -28,7 +28,7 @@ extern const int jsonDoNotIndent;
|
||||
|
||||
@interface NSDictionary (BSJSONAdditions)
|
||||
|
||||
+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
|
||||
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
|
||||
- (NSString *)jsonStringValue;
|
||||
|
||||
@end
|
||||
|
||||
@@ -35,10 +35,10 @@ const int jsonDoNotIndent = -1;
|
||||
|
||||
@implementation NSDictionary (BSJSONAdditions)
|
||||
|
||||
+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString
|
||||
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString
|
||||
{
|
||||
NSScanner *scanner = [[NSScanner alloc] initWithString:jsonString];
|
||||
NSDictionary *dictionary = nil;
|
||||
NSMutableDictionary *dictionary = nil;
|
||||
[scanner scanJSONObject:&dictionary];
|
||||
[scanner release];
|
||||
return dictionary;
|
||||
|
||||
@@ -45,7 +45,7 @@ extern NSString *jsonNullString;
|
||||
|
||||
@interface NSScanner (PrivateBSJSONAdditions)
|
||||
|
||||
- (BOOL)scanJSONObject:(NSDictionary **)dictionary;
|
||||
- (BOOL)scanJSONObject:(NSMutableDictionary **)dictionary;
|
||||
- (BOOL)scanJSONArray:(NSArray **)array;
|
||||
- (BOOL)scanJSONString:(NSString **)string;
|
||||
- (BOOL)scanJSONValue:(id *)value;
|
||||
|
||||
@@ -48,7 +48,7 @@ NSString *jsonNullString = @"null";
|
||||
|
||||
@implementation NSScanner (PrivateBSJSONAdditions)
|
||||
|
||||
- (BOOL)scanJSONObject:(NSDictionary **)dictionary
|
||||
- (BOOL)scanJSONObject:(NSMutableDictionary **)dictionary
|
||||
{
|
||||
//[self setCharactersToBeSkipped:nil];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user