session-ios/Signal/src/util/DictionaryUtil.m
Frederic Jacobs c6d44e59e2 TextSecureKit Refactoring
- Using same clang format file for old and new files.
- Moving out all TextSecure code to allow other clients (OS X, iOS) to
  integrate easily TextSecure functionality.
- Use TextSecure API to signup.
2015-12-22 23:41:10 +01:00

14 lines
384 B
Objective-C

#import "Constraints.h"
#import "DataUtil.h"
#import "DictionaryUtil.h"
@implementation NSDictionary (Util)
- (NSString *)encodedAsJson {
NSError *jsonSerializeError = nil;
NSData *data = [NSJSONSerialization dataWithJSONObject:self options:0 error:&jsonSerializeError];
checkOperation(jsonSerializeError == nil);
return [data decodedAsUtf8];
}
@end