mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-22 12:08:55 +00:00
30 lines
853 B
Objective-C
30 lines
853 B
Objective-C
#import "BITTelemetryObject.h"
|
|
|
|
@implementation BITTelemetryObject
|
|
|
|
// empty implementation for the base class
|
|
- (NSDictionary *)serializeToDictionary{
|
|
return [NSDictionary dictionary];
|
|
}
|
|
|
|
- (NSString *)serializeToString {
|
|
NSDictionary *dict = [self serializeToDictionary];
|
|
NSMutableString *jsonString;
|
|
NSError *error = nil;
|
|
NSData *json;
|
|
json = [NSJSONSerialization dataWithJSONObject:dict options:0 error:&error];
|
|
jsonString = [[NSMutableString alloc] initWithData:json encoding:NSUTF8StringEncoding];
|
|
NSString *returnString = [[jsonString stringByReplacingOccurrencesOfString:@"\"true\"" withString:@"true"] stringByReplacingOccurrencesOfString:@"\"false\"" withString:@"false"];
|
|
return returnString;
|
|
}
|
|
|
|
- (void)encodeWithCoder:(NSCoder *)coder {
|
|
}
|
|
|
|
- (instancetype)initWithCoder:(NSCoder *)coder {
|
|
return [super init];
|
|
}
|
|
|
|
|
|
@end
|