<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hi Ben,</p>

<p dir="auto">What’s the use case that you were thinking of? <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">KeyPath</code>s could be useful in the case where you don’t need to customize your key names, but cannot represent a custom case like</p>

<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px; color:black" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7"><span style="color: #008800; font-weight: bold">public</span> <span style="color: #008800; font-weight: bold">struct</span> <span style="color: #BB0066; font-weight: bold">Post</span> {
    <span style="color: #008800; font-weight: bold">var</span> <span style="color: #996633">authorID</span>: <span style="color: #007020">Int</span>
    <span style="color: #008800; font-weight: bold">var</span> <span style="color: #996633">bodyText</span>: <span style="color: #007020">String</span>

    <span style="color: #008800; font-weight: bold">private</span> <span style="color: #008800; font-weight: bold">enum</span> <span style="color: #BB0066; font-weight: bold">CodingKeys</span> : <span style="color: #007020">String</span>, CodingKey {
        <span style="color: #008800; font-weight: bold">case</span> authorID = <span style="background-color: #fff0f0">"author_id"</span>
        <span style="color: #008800; font-weight: bold">case</span> bodyText = <span style="background-color: #fff0f0">"body_text"</span>
    }
}
</code></pre>



<p dir="auto">Or am I misunderstanding?</p>

<p dir="auto">— Itai</p>

<p dir="auto">On 22 Mar 2017, at 5:39, Ben Rimmington wrote:</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999">
<p dir="auto">On 15 Mar 2017, at 22:40, Itai Ferber wrote:</p>

<p dir="auto">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.</p>
</blockquote>

<p dir="auto">Instead of a CodingKeys enum, could the KeyPath proposal <a href="https://github.com/apple/swift-evolution/pull/644" style="color:#777">https://github.com/apple/swift-evolution/pull/644</a> be utilized somehow?</p>

<p dir="auto">-- Ben</p>
</blockquote>
</div>
</div>
</body>
</html>