-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
比如这样一个模型
struct Coord: ExCodable {
private(set) var y: Int = 0
private(set) var x: Int = 0
private(set) var w: Int = 0
private(set) var h: Int = 0
static var keyMapping: [KeyMap<Coord>] {
[KeyMap(\.y, to: "y")]
}
init(from decoder: Decoder) throws {
try decode(from: decoder, with: Self.keyMapping)
}
}static var keyMapping: [KeyMap<Coord>] {
[KeyMap(\.y, to: "y"),
....
]
}我需要在这个方法中把所有的属性都列出来吗?可能做到 只列出那些需要做映射的属性,不用做映射的属性可以不列出
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested