A correct and safe(er) JSON RFC 8259 reader/writer for Common Lisp with sane defaults.
jzon is a JSON parsing and serialization library for Common Lisp that emphasizes safety, correctness, and developer convenience. It provides robust, RFC 8259-compliant functions for reading and writing JSON, with built-in protections against malicious or malformed input. The library includes both simple APIs for common tasks and streaming interfaces for advanced use cases.
Common Lisp developers who need a reliable, safe, and correct JSON library for data interchange, especially when handling untrusted JSON sources or requiring strict compliance with the JSON specification.
Developers choose jzon because it is the only Common Lisp JSON library that passes the entire JSONTestSuite, ensuring full RFC 8259 compliance. It offers superior safety features, type-safe APIs, and avoids common pitfalls like infinite interning of strings, making it a dependable choice for production use.
A correct and safe(er) JSON RFC 8259 reader/writer with sane defaults.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enforces configurable limits on nesting depth, string length, and number values to prevent crashes from malicious or malformed JSON, as highlighted in the Safety section.
Passes the entire JSONTestSuite, correctly rejecting all invalid inputs and accepting all valid ones per RFC 8259, ensuring strict spec adherence.
Provides `jzon:parse` and `jzon:stringify` functions with sensible defaults mirroring JavaScript, plus streaming reader/writer interfaces for advanced use.
Uses object key pooling to share duplicate keys and coerces strings to `base-string` where possible, reducing memory usage on implementations like SBCL.
Requires external packages like closer-mop, flexi-streams, float-features, and uiop, increasing setup complexity and potential compatibility issues.
Acknowledged to be slower than performance leaders like jsown (aiming for 50% of its speed), making it less ideal for raw speed-critical tasks.
Advanced features like custom serialization via generic functions (`jzon:coerced-fields`, `jzon:write-value`) require deeper Lisp knowledge and can be overkill for simple cases.