[Add] DocumentReaderFullAuthRFIDStage 7.5.10872
[CocoaPods.git] / Specs / 2 / b / 7 / CSDataModel / 1.1.1 / CSDataModel.podspec.json
blob2c059c11c3f475ad9bbeac4a1462ed803136f0a4
2   "name": "CSDataModel",
3   "version": "1.1.1",
4   "summary": "一个简单的数据模型基类,方便将NSDictionary、NSArray等类型数据转为模型对象",
5   "description": "# CSDataModel\n\n一个简单的数据模型基类,方便将NSDictionary、NSArray等类型数据转为模型对象\n\n## 基本使用\n\n例如一个JSON对象Department\n\n{\n\"name\": \"DepartmentA\",\n\"tel\": \"88888888\",\n\"num\": 1\n}\n\n该JSON String转化成NSDictionary: dict1\n\n### 模型:\n\n@interface Department : CSBaseModel\n@property (nonatomic , strong) NSString *name;\n@property (nonatomic , strong) NSString *tel;\n@property (nonatomic , strong) NSNumber *num;\n@end\n\n### 转化时:\n\nDepartment *deprtmt = [Department modelFromDict:dict1];\n\n## 嵌套使用\n\n### 模型\n对于常见的情况:\n\n{\n\"name\": \"departmentA\",\n\"number\": 3,\n\"members\": [{\n\"name\": \"王五\",\n\"jobNum\": \"0023\"\n},\n{\n\"name\": \"陈六\",\n\"jobNum\": \"0028\"\n}]\n}\n\n该JSON String转化成NSDictionary: dict2\n\nDepartment中含有成员Member\n\n@interface Department : CSBaseModel\n@property (nonatomic , strong) NSString *name;\n@property (nonatomic , strong) NSArray<Member*> *members;\n@end\n\n@interface Member : CSBaseModel\n@property (nonatomic , strong) NSString *name;\n@property (nonatomic , strong) NSNumber *jobNum;\n@end\n\nDeparmtent实现文件中需要注册子模型的类\n\n@implementation Department\n-(instancetype)init{\nself = [super init];\nif (self) {\n[self registerClass:[Member class]   forProperty:@\"members\"];\n}\nreturn self;\n}\n@end\n\n### 转化时:\n\nDepartment *deprtmt = [Department modelFromDict:dict2];\n\n转化成功后,可通过deprtmt.members访问member数组",
6   "homepage": "https://github.com/csdq/CSDataModel",
7   "license": {
8     "type": "GPL-3.0",
9     "file": "LICENSE"
10   },
11   "authors": {
12     "Mr.s": "stqemail@163.com"
13   },
14   "source": {
15     "git": "https://github.com/csdq/CSDataModel.git",
16     "tag": "1.1.1"
17   },
18   "platforms": {
19     "ios": "8.0"
20   },
21   "source_files": "CSDataModel/Classes/**/*"