mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
17 lines
472 B
Objective-C
17 lines
472 B
Objective-C
#import "DataUtil.h"
|
|
#import "DictionaryUtil.h"
|
|
#import "Constraints.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
|