首页 > 代码库 > NSKeyedArchiver 类 格式

NSKeyedArchiver 类 格式

结论:NSKeyedArchiver 以健值对+类名的形式保存数据;

 

NSDictionary *tDic = @{@"kxxxx":@"hhhh",@"kyyyy":@"pppp",@"keeeek":@"oooo"};

 

NSMutableData *data = http://www.mamicode.com/[[NSMutableData alloc] init];

    NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];

    [archiver encodeObject:tDic forKey:@"keyxxx"];

    [archiver finishEncoding];

 

bplist00‘"#X$versionX$objectsY$archiverT$top

WNS.keysZNS.objectsV$class£

ÄÄÄ£ÄÄÄÄUkxxxxUkyyyyVkeeeekThhhhTppppToooo“Z$classnameX$classes\NSDictionary¢ !\NSDictionaryXNSObject_NSKeyedArchiver—$%TrootÄ#-27AGNVahlnprvxz|~Ñäëñõ†•∞π?…÷?ÒÙ??

NSKeyedArchiver 类 格式