The one place JSON lives, so the parser behind it is a single-file change.
clojure.data.json is chosen for its dependency profile rather than its
speed: it is pure Clojure and pulls nothing else in, which matters more in a
library other applications embed than raw throughput does on payloads this
size. The JDK's own JSON API (JEP 540) lands in jdk.incubator.json in JDK 28
and would slot in here.
The one place JSON lives, so the parser behind it is a single-file change. `clojure.data.json` is chosen for its dependency profile rather than its speed: it is pure Clojure and pulls nothing else in, which matters more in a library other applications embed than raw throughput does on payloads this size. The JDK's own JSON API (JEP 540) lands in jdk.incubator.json in JDK 28 and would slot in here.
(read-str s)Parses JSON into Clojure data, with keyword keys.
Parses JSON into Clojure data, with keyword keys.
(write-str x)Renders Clojure data as JSON. Slashes and non-ASCII are left as they are: both are valid JSON, and escaping them only makes the payload bigger and the transcript harder to read.
Renders Clojure data as JSON. Slashes and non-ASCII are left as they are: both are valid JSON, and escaping them only makes the payload bigger and the transcript harder to read.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |