Skip to content

MrLoong/LYModelData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用

基本的Model 和 JSON相互转换

    NSString *girlFriend = @"白菜";
    id parmenters = @{
                      @"girlFriend":girlFriend,
                      @"age":@22.1,
                      @"name":@"Lastdays",
                      @"time":@"2016-03-18 5:55:49 +0000"
                      };
    
    
    Model *model = [Model LYModelWithJSON:parmenters];
    NSLog(@"%@",model.girlFriend);
    NSLog(@"%@",model.name);
    NSLog(@"%@",model.age);
    NSLog(@"%@",model.time);

    
    NSLog(@"========================================");
    
    NSDictionary *jsonObject= [model LYModelToJson];
    NSLog(@"%@",jsonObject);

欢迎指出问题

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published