<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 22 Jan 2013, at 11:28, Олег wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p> (json:with-decoder-simple-clos-semantics<br>  (let ((json:*json-symbols-package* nil))<br>    (let ((x (json:decode-json-from-string<br>               "{\"foo1\": [1, 2, 3], \"bar1\": true,<br>                 \"baz1\": \"!\"}")))<br>      (with-slots (foo1 bar1 baz1) x<br>        (values x foo1 bar1 baz1)))))<br><br></p><p>The slot FOO1 is unbound in the object #<#<JSON:FLUID-CLASS NIL<br>                                           {1004085F33}><br>                                         {1003CAFB43}>.<br>   [Condition of type UNBOUND-SLOT]</p></blockquote><br></div><div><br></div>When Lisp slot names are derived from JSON object keys, they are transcribed to more Lisp-like conventions: camel case is replaced with hyphenation, all caps become framing asterisks, etc.  So, slot names in your Lisp code should be written with hyphens:<div><br></div><div><p style="margin: 0.0px 0.0px 12.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">  (json:with-decoder-simple-clos-semantics<br>     (let ((json:*json-symbols-package* nil))<br>       (let ((x (json:decode-json-from-string<br>                  "{\"foo1\": [1, 2, 3], \"bar1\": true,<br>                    \"baz1\": \"!\"}")))<br>         (with-slots (foo-1 bar-1 baz-1) x<br>           (values x foo-1 bar-1 baz-1)))))</font></p><p style="margin: 0.0px 0.0px 12.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><br></font></p><p style="margin: 0.0px 0.0px 12.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">  => </font>#<#<JSON:FLUID-CLASS NIL {5D03A341}> {5A1ECF11}></p><p style="margin: 0.0px 0.0px 12.0px 0.0px">  => #(1 2 3)</p><div>  => T</div><div>  =>"!"</div></div><div><br></div><div>If this disagrees too much with the conventions of your code, you can change the way identifiers are transcribed by setting / rebinding the variable *JSON-IDENTIFIER-NAME-TO-LISP*<font class="Apple-style-span" face="monospace"> to the appropriate transcriber function.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace">Hope this helps.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"> — B. Smilga.</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div></body></html>