Monotone-Parent: 8d642918307c4ec207760dac241eca7219d0074a

Monotone-Revision: 2303b51b776f8ba14da83e3a05e92f43b13279cc

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-25T17:30:24
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-25 17:30:24 +00:00
parent 8430768d24
commit 8b02b7fe51
9 changed files with 216 additions and 0 deletions
+17
View File
@@ -184,6 +184,23 @@ static NSMutableCharacterSet *urlAfterEndingChars = nil;
return selfCopy;
}
- (NSString *) jsonRepresentation
{
NSMutableString *representation;
representation = [NSMutableString stringWithString: self];
[representation replaceString: @"\\" withString: @"\\\\"];
[representation replaceString: @"\"" withString: @"\\\""];
[representation replaceString: @"/" withString: @"\\/"];
[representation replaceString: @"\b" withString: @"\\b"];
[representation replaceString: @"\f" withString: @"\\f"];
[representation replaceString: @"\n" withString: @"\\n"];
[representation replaceString: @"\r" withString: @"\\r"];
[representation replaceString: @"\t" withString: @"\\t"];
return [NSString stringWithFormat: @"\"%@\"", representation];
}
#if LIB_FOUNDATION_LIBRARY
- (BOOL) boolValue
{