比如后台返回数据包含字段time 是个时间戳,如何增加一个timeStr 字段 ,timeStr 数据来源自time字段,mapping 方法里怎么写?
t40tm48m1#
handle timeStr in didFinishMapping function
timeStr
didFinishMapping
ut6juiuv2#
func mapping(mapper: HelpingMapper) { mapper <<< [ timeStr <-- ["time", "timeStr"], time <-- ["time", "timeStr"], ] }
2条答案
按热度按时间t40tm48m1#
handle
timeStr
indidFinishMapping
functionut6juiuv2#