         <span class="k">try</span> <span class="k">super</span><span class="o">.</span><span class="nf">encode</span><span class="p">(</span><span class="nv">to</span><span class="p">:</span> <span class="n">encoder</span><span class="p">)</span>
        <span class="p">}</span>
    <span class="p">}</span>
</code></pre>

<p>Here is an example how to use a custom User type:</p>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">user</span> <span class="o">=</span> <span clas