JSON 到 NSObject 的映射库 Motis
- 授权协议: Apache
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/mobilejazz/Motis
- 软件文档: https://github.com/mobilejazz/Motis
软件介绍
Motis 使用 Cocoa 的 KVC 实现了智能的 JSON 到 NSObject 对象的映射。
示例代码:
// --- User.h --- //
@interface User : NSObject
@property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) NSIntger userId;
@property (nonatomic, strong) NSDate *creationDate;
@property (nonatomic, strong) NSURL *website;
@property (nonatomic, assing) NSInteger views;
@property (nonatomic, assing) NSInteger ranking;
@end
// --- User.m --- //
@implementation User
+ (NSDictionary*)mts_mapping
{
return @{@"user_name": mts_key(name),
@"user_id": mts_key(userId),
@"creation_date": mts_key(creationDate),
@"website": mts_key(website),
@"user_stats.views": mts_key(views), // <-- KeyPath access
@"user_stats.ranking": mts_key(ranking), // <-- KeyPath access
};
}
@end
MySQL权威指南
Randy Jay Yarger / 林琪、朱涛江 / 中国电力出版社 / 2003-11-1 / 49.00元
为一种开源数据库,MySQL已经成为最流行的服务器软件包之一。开发人员在其数据库引擎中提供了丰富的特性(只需很少的内存和CPU支持)。 因此,众多Linux和Unix服务器(以及一些Windows服务器)都采用MySQL作为其数据库引擎。由于MySQL作为Web站点后端时速度特别快而且相当方便,所有在目前流行的一个词LAMP(表示Linux、Apache、MySQL和Perl、Python或......一起来看看 《MySQL权威指南》 这本书的介绍吧!
