码迷,mamicode.com
首页 > Web开发 > 详细

json数据解析

时间:2016-11-25 12:16:28      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:name   ace   record   error   文件   nat   end   lis   for   

1、ESJson Format和JSonModel配合使用自动生成的数据model

 

AppealListModel.h文件

#import <Foundation/Foundation.h>

 

@class ComplaintlistItem;

@interface AppealListModel : NSObject

 

@property (nonatomic, assign) NSInteger IsSuccess;

 

@property (nonatomic, assign) NSInteger RecordCount;

 

@property (nonatomic, copy) NSString *ErrorMessage;

 

@property (nonatomic, strong) NSArray<ComplaintlistItem *> *ComplaintList;

 

@end

@interface ComplaintlistItem : NSObject

 

@property (nonatomic, copy) NSString *OrderID;

 

@property (nonatomic, copy) NSString *YzName;

 

@property (nonatomic, copy) NSString *ComplaintStateName;

 

@property (nonatomic, assign) NSInteger ComplaintID;

 

@property (nonatomic, assign) NSInteger Frequency;

 

@property (nonatomic, copy) NSString *Content;

 

@property (nonatomic, assign) NSInteger ComplaintState;

 

@property (nonatomic, copy) NSString *CreateTime;

 

@end

 

 

 

AppealListModel.m文件

#import "AppealListModel.h"

 

@implementation AppealListModel

 

 

+ (NSDictionary *)objectClassInArray{

    return @{@"ComplaintList" : [ComplaintlistItem class]};

}

@end

@implementation ComplaintlistItem

 

@end

 

2、JSonModel生成对象:

 

json数据解析

标签:name   ace   record   error   文件   nat   end   lis   for   

原文地址:http://www.cnblogs.com/Jordandan/p/6100644.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!