HandyJSON
HandyJSON copied to clipboard
多层级映射问题
extension CGRect: HandyJSON {
public mutating func mapping(mapper: HelpingMapper) {
mapper <<<
self.origin.x <-- ["x"]
mapper <<<
self.origin.y <-- ["y"]
mapper <<<
self.size.width <-- ["width"]
mapper <<<
self.size.height <-- ["height"]
}
public mutating func didFinishMapping() {
// print(self)
}
}
我这样写不能赋值,有什么办法吗