Hi Ben,
What’s the use case that you were thinking of? `KeyPath`s could be
useful in the case where you don’t need to customize your key names,
but cannot represent a custom case like
```swift
public struct Post {
var authorID: Int
var bodyText: String
private enum CodingKeys : String, CodingKey {
case authorID = "author_id"
case bodyText = "body_text"
}
}
```
Or am I misunderstanding?
— Itai
On 22 Mar 2017, at 5:39, Ben Rimmington wrote:
On 15 Mar 2017, at 22:40, Itai Ferber wrote:
The following introduces a new Swift-focused archival and
serialization API as part of the Foundation framework. We’re
interested in improving the experience and safety of performing
archival and serialization, and are happy to receive community
feedback on this work.
Instead of a CodingKeys enum, could the KeyPath proposal
<https://github.com/apple/swift-evolution/pull/644> be utilized
somehow?
-- Ben
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution