winddpan / CodableWrapper

@CodingKey("encoder", "decoder") var cool: Bool = true
MIT License
362 stars 30 forks source link

处理json时候能加一个和HandyJson 一样的 designatedPath 字段吗 #8

Closed SnailLoveSmile closed 2 years ago

winddpan commented 2 years ago
if let cat = Cat.deserialize(from: jsonString, designatedPath: "data.cat") {
    print(cat.name)
}

类似这样吗?这部分不属于Codable范围,可以自行写个JSONDecoder扩展。