mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 11:25:24 +00:00
Monotone-Parent: 858274c7be3ad2a6383c2f85c8ad10907bb43292
Monotone-Revision: 2718d596001d2e9358dcce09a959434c8f775f9f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-05T18:50:05
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2012-04-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.m (-objectFromJSONString):
|
||||
added a work-around for JSON strings that were escaped one too
|
||||
many time, in previous versions of sope-gdl1-xxx.
|
||||
|
||||
2012-04-04 Jean Raby <jraby@inverse.ca>
|
||||
|
||||
* Added a new tool: 'sogo-tool expire-sessions'
|
||||
|
||||
@@ -501,6 +501,7 @@ static int cssEscapingCount;
|
||||
SBJsonParser *parser;
|
||||
NSObject *object;
|
||||
NSError *error;
|
||||
NSString *unescaped;
|
||||
|
||||
object = nil;
|
||||
|
||||
@@ -513,9 +514,19 @@ static int cssEscapingCount;
|
||||
error: &error];
|
||||
if (error)
|
||||
{
|
||||
[self errorWithFormat: @"json parser: %@", error];
|
||||
[self errorWithFormat: @"original string is: %@", self];
|
||||
object = nil;
|
||||
[self errorWithFormat: @"json parser: %@,"
|
||||
@" attempting once more after unescaping...", error];
|
||||
unescaped = [self stringByReplacingString: @"\\\\"
|
||||
withString: @"\\"];
|
||||
object = [parser objectWithString: unescaped
|
||||
error: &error];
|
||||
if (error)
|
||||
{
|
||||
[self errorWithFormat: @"total failure. Original string is: %@", self];
|
||||
object = nil;
|
||||
}
|
||||
else
|
||||
[self logWithFormat: @"initial object deserialized successfully!"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user