Latest 1.2.2
Homepage https://github.com/weng1250/WZLSerializeKit
License None
Platforms ios 6.0, requires ARC
Authors

iOS serialization in 1 line.
1行代码完成iOS序列化与反序列化,本文件提供iOS下的序列化与反序列集成方案。

本文件提供iOS下的序列化与反序列集成方案,封装后用一行代码即可轻松实现。
在传统方式中当你需要对某个对象进行序列化与反序列化时,往往需要实现协议以及协议(非必须),
在协议方法中对需要序列化的变量执行encode&decode操作。当变量较多并且需要序列化的自定义对象较多时容易出现过多冗余代码,稍有不慎容易出错。
WZLSerializeKit在运行时对类以及所有层级父类的变量进行遍历,避免遗漏。属性越多,优势越明显。

Usage:

 Person.h:
 ========================================
#import "WZLSerializeKit.h"

@interface Person: SomeSuperclass<NSCoding, NSCopying>
{
    ...
}

@end
========================================

 Person.m:
========================================
#import "Person.h"

@implementation Person

WZLSERIALIZE_CODER_DECODER();
WZLSERIALIZE_COPY_WITH_ZONE();
WZLSERIALIZE_DESCRIPTION();//(NOT NECESSARY)

@end
========================================

at the place where you want to serialize Person instance:
eg:

//archive object to NSData
WZLSERIALIZE_ARCHIVE(person, @"Person", [self filePath]);
//unarchive NSData to object
Person  thePerson = nil;
WZLSERIALIZE_UNARCHIVE(thePerson, @"Person", [self filePath]);

Latest podspec

{
    "name": "WZLSerializeKit",
    "version": "1.2.2",
    "summary": "A four-line tool to enable serialize and deserialize in iOS platform",
    "description": "A four-line tool to enable serialize and deserialize in iOS platform. 4u884cu4ee3u7801u5b8cu6210iOSu5e8fu5217u5316u4e0eu53cdu5e8fu5217u5316.",
    "homepage": "https://github.com/weng1250/WZLSerializeKit",
    "license": {
        "type": "None",
        "file": "LICENSE"
    },
    "authors": {
        "Zilin Wengu7fc1u5b50u6797": "[email protected]"
    },
    "source": {
        "git": "https://github.com/weng1250/WZLSerializeKit.git",
        "tag": "1.2.2"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "WZLSerializeKit/*.{h,m}",
    "public_header_files": "WZLSerializeKit/*.h"
}

Pin It on Pinterest

Share This