ich, if invoked, prints a representation of the offending datum to a string (with <code class="other-name">*print-escape*</code> bound to <code class="other-name">nil</code>) and encodes that string instead of the datum.</p>

<div class="example">
<pre class="in-code">
(defstruct frob xyzzy)
</pre>
<pre class="value">FROB</pre>

<pre class="in-code">
(handler-bind
    ((json:unencodable-value-error
      (lambda (err)
        (declare (ignore err))
        (invoke-restart 'json:substitute-printed-representa