Skip to content

cl json error

Yokota Yuki edited this page Mar 4, 2021 · 1 revision

This problem seems to be same with this issue: https://github.com/hankhero/cl-json/issues/14

(defun read-json-file (path)
  (with-open-file (stream path :direction :input)
    (cl-json:with-decoder-simple-clos-semantics
      (cl-json:decode-json stream))))
{
   "foo": ["bar", "baz"],
   "": 0,
   "a/b": 1,
   "c%d": 2,
   "e^f": 3,
   "g|h": 4,
   "i\\j": 5,
   "k\"l": 6,
   " ": 7,
   "m~n": 8
}
JSON-POINTER> (read-json-file "rfc6901-example.json")

Invalid SB-MOP:SLOT-DEFINITION initialization: the
initialization argument :NAME was constant: :FOO.
   [Condition of type SB-PCL::SLOTD-INITIALIZATION-ERROR]
See also:
  The Art of the Metaobject Protocol, SLOT-DEFINITION [:initialization]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1003690003}>)
Clone this wiki locally