A Clojure library for parsing and generating JSON with no external dependencies.
data.json is a Clojure library for parsing JSON strings into Clojure data structures and generating JSON strings from Clojure data. It solves the problem of data interchange between Clojure applications and external systems that use the ubiquitous JSON format.
Clojure developers who need to read or write JSON data, such as when consuming REST APIs, handling configuration files, or serializing data for storage or transmission.
Developers choose data.json for its strict JSON compliance, lack of external dependencies, and its idiomatic Clojure API that includes powerful customization options for key and value transformation during conversion.
JSON in Clojure
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Fully adheres to the JSON specification per json.org, ensuring reliable data interchange with other systems without compatibility issues.
Implemented purely in Clojure with no external libraries, simplifying deployment and avoiding dependency conflicts in projects.
Supports :key-fn and :value-fn options for fine-grained control over map key and value transformation during reading and writing, as shown in the README examples.
Can read from java.io.Reader and write to java.io.Writer, enabling memory-efficient processing of large JSON data streams directly.
Includes built-in writing for types like java.util.Date, java.time.Instant, and UUIDs, easing serialization of common Java objects without extra code.
The :value-fn option only works on maps (JSON objects), requiring manual pre- or post-processing for root-level arrays or other structures, as admitted in the README.
Version 0.2.0 introduced breaking API changes without backward compatibility, indicating past instability that could affect long-term maintenance, despite later fixes.
Does not follow semantic versioning, making it harder to anticipate the impact of version upgrades based on version numbers alone, as noted in the release scheme.
As a pure Clojure implementation, it may not match the raw parsing speed of optimized native Java libraries like Jackson in high-performance scenarios, despite continuous improvements.