To run the example project, clone the repo, and run pod install
from the Example directory first.
XXModel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "XXModel"
-
序列化内的所有模型遵守 协议
-
模型的字段对应的class,除了遵守协议外,还需要对字段指定类型,因为OC的类型机制是编译时的范型
/**
jsonkey <=> modelkey 转换,如果父类实现了,请同父类的一起返回
属性映射字典
*/
+(nonnull NSDictionary<NSString *,NSString *> *)xx_propertyMapDictionary;
/**
需要将指定的key转化为对应的对象,如果父类实现了,请同父类的一起返回
*/
+(nonnull NSDictionary *)xx_ModelPropertyDictionary;
/**
需要将指定的key转化为对应的对象列表,如果父类实现了,请同父类的一起返回
*/
+(nonnull NSDictionary *)xx_ArrayModelPropertyDictionary;
LXF, rdxer@foxmail.com
XXModel is available under the MIT license. See the LICENSE file for more info.