Zulu-Inuoe / jzon

A correct and safe(er) JSON RFC 8259 reader/writer with sane defaults.
MIT License
151 stars 14 forks source link

Add LispWorks 8 for structure serialization #54

Closed louis77 closed 1 year ago

louis77 commented 1 year ago

MOP for structure-objects is supported for CLOSER-MOP + LispWorks 8.

It might be supported for earlier versions of LispWorks, but since they are not supported by CLOSER-MOP, I've added the lispworks8 feature explicitly.

I've tested the change with my LispWorks 8 (8.0.1 on macOS) installation successfully:

(defstruct my-struct a b c)
=> MY-STRUCT

(setq inst (make-my-struct :a 1 :b 2 :c "the letter c"))
=> #S(MY-STRUCT :A 1 :B 2 :C "the letter c")

(jzon:stringify inst)
=> "{\"a\":1,\"b\":2,\"c\":\"the letter c\"}"