mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 09:53:23 +00:00
Monotone-Parent: bcd29d180f0f481f03088f9e1fcb3066dcfdbcc9
Monotone-Revision: 367e72af9d08f48f2e598a1e344c784b6bc4ffac Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-26T19:31:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -35,15 +35,6 @@ const int jsonDoNotIndent = -1;
|
||||
|
||||
@implementation NSDictionary (BSJSONAdditions)
|
||||
|
||||
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString
|
||||
{
|
||||
NSScanner *scanner = [[NSScanner alloc] initWithString:jsonString];
|
||||
NSMutableDictionary *dictionary = nil;
|
||||
[scanner scanJSONObject:&dictionary];
|
||||
[scanner release];
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
- (NSString *)jsonStringValue
|
||||
{
|
||||
return [self jsonStringValueWithIndentLevel:0];
|
||||
@@ -197,3 +188,16 @@ const int jsonDoNotIndent = -1;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMutableDictionary (BSJSONAdditions)
|
||||
|
||||
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString
|
||||
{
|
||||
NSScanner *scanner = [[NSScanner alloc] initWithString:jsonString];
|
||||
NSMutableDictionary *dictionary = nil;
|
||||
[scanner scanJSONObject:&dictionary];
|
||||
[scanner release];
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user