v0.1.0
First release of cl-json-kit — a dependency-free, SBCL-only JSON reader and writer for Common Lisp strings and character streams.
Highlights
- Reading:
parse(whole string),parse-prefix(one value + exclusive end position), andread-json(one value from a stream without over-consuming following input). - Parser options: shape (
:object-type,:array-type,:key-type), duplicate-key policy, customnull/false/truevalues, and:key-decoder/:number-decoder/:object-hook/:array-hookcallbacks. - Resource bounds for untrusted input:
:max-depth,:max-input-length,:max-string-length,:max-number-length,:max-array-elements,:max-object-members,:timeout-seconds. - Distinct sentinels
+json-null+/+json-false+(withjson-null-p/json-false-p) keep JSONnullandfalsedistinguishable from Lispniland from each other. - UTF-16 surrogate pairs in
\uXXXXescapes decode into a single character (e.g. emoji). - Rich errors:
json-parse-errorcarriesposition,line,column,path,expected,context, andtext;json-serialization-errorcarriesmessageandpath. - Writing:
stringify(to string) andwrite-json(to stream) dispatch purely by Lisp type (hash-table→ object,vector/list→ array), never guessing an object/array shape from a cons list's structure. Options include:pretty,:indent,:sort-keys,:null-value/:false-value,:number-encoder, and output bounds. - Ordered objects:
make-json-object/json-object-p/json-object-memberspreserve member order and duplicate keys, plusalist->json-object/json-object->alist.
Full details in CHANGELOG.md.