HandyJSON icon indicating copy to clipboard operation
HandyJSON copied to clipboard

如何在数据模型内部,进行update?

Open fordringd2008 opened this issue 8 years ago • 3 comments

如题

class UserAccount: HandyJSON { required init() { super.init() let json = "{/"id/":/"1/"}" // 在对象内部进行自我update, 类似于 YYModel的 self.yy_modelSet(withJSON: dict) // Cannot pass immutable value as inout argument: 'self' is immutable 报错 JSONDeserializer.update(object: &self, from: dict) } }

fordringd2008 avatar Dec 24 '17 07:12 fordringd2008

我也遇到这个问题了,请问你解决了吗

xzwgithub avatar Apr 23 '18 09:04 xzwgithub

我也碰到这个问题了,要在object内部更新object的property

zhangzhibinhi avatar Jun 08 '20 02:06 zhangzhibinhi

我也遇到了同样的问题?请问解决了么?

xwppoppin avatar Sep 09 '21 00:09 xwppoppin